0
votes
1answer
147 views

indexing files in folder and use this index

I'd like to list and index files (video files such as .mp4, .avi, ... in my case) in a directory I used : setlocal disableDelayedExpansion for /f "delims=" %%A in ('forfiles /s /m * /c "cmd /c echo ...
1
vote
2answers
81 views

List files with no linebreaks

I have a directory with a bunch of folders in them. I want each folder to create a text file that lists all the files in that folder. The format to list files should look like this: "001.jpg" ...
3
votes
2answers
131 views

Accidentally blocked myself out of my private UNIX directory

I used the following command to see who had permission to my directory. fs la I then wanted to block someone out, so I used the command (and accidentally used my username instead of the person I ...
0
votes
1answer
1k views

How to create a batch file to delete sub folders and keep files?

I have a folder on my Windows system with the following contents: c:\folder\folder1 c:\folder\folder2 c:\folder\folder3 c:\folder\folder4 c:\folder\folder5 c:\folder\folder6 c:\folder\A.bat ...
3
votes
1answer
1k views

100% reliable directory copy on Windows systems (NTFS)

Is there a directory copying method for NTFS that can copy a directory 100% accurately, every time, with every single file, sub-directory, permission, attribute, and symbolic link / junction intact ...
1
vote
2answers
265 views

Not able to output to file in the Windows command line

In the following code, I need to take the path and size of folder and subfolders into a file. But when the loop runs for the second time, path and size are not getting printed to the file. size.txt ...
5
votes
2answers
16k views

How can I list directories and their sizes in command prompt?

I would like to see sizes of subfolders in a folder, similar to linux du -sh command. How can I list directories and their sizes in command prompt?
0
votes
1answer
72 views

Windows “…” directory [closed]

I noticed something weird today. On the windows command prompt these are all valid: cd ..... cd .... cd ... these are the more well known versions of parent dir and current dir cd .. cd . What ...
1
vote
1answer
296 views

Concatenating many files into one

I currently have this command: copy /b *.txt newfile.txt But I want to include all files with folders as well. How can I do this? Is it possible to add this to Apache Ant as well? I also ...
1
vote
2answers
4k views

How can I undo an “RD /S /Q <path>” command prompt command?

I accidentally deleted an important folder I had on my Windows 7 desktop using the administrative command prompt command listed as: "RD /S /Q "C:\Users\Robby\Desktop\Pictures&Things" I ...
1
vote
2answers
550 views

How do I copy only subdirectories but exclude other files in Linux?

Here is my directory structure: /home/folders/test (some directories) and files test.xml test1.xml test.js images (directory) /home/folders/test/images/( some directories ) and files I have to ...
1
vote
2answers
2k views

Cannot Delete an Empty Folder in Windows 7

I've used this question's answer by user "Moab" to give myself permission to delete an empty folder, so that I no longer get "accessed denied". However, now when I try removing this folder, I get a ...
3
votes
4answers
1k views

Finding subdirectories inside all directories with the same name

I want to run a command to: Find all directories named "inc" under a folder "X". List all the subdirectories under each "X/.../inc/". Redirect the output to a file named "list" I tried various ...
1
vote
1answer
357 views

cd Command Linux and Mystery Flags

Platform: CentOS 6.2 Shell:tcsh I'm playing around with cd for a BASH script, and noticed the wondrous cd - option, but was left with many questions... Why the cd -? Isn't this redundant with cd ...
1
vote
2answers
336 views

“which” Program Requires Shell Refresh to See Newly Installed Programs?

Why does the Linux program which require you to refresh the shell (e.g. type tcsh in the terminal) to see new programs installed in your path?? I was baffled why I couldn't access a program, which ...
4
votes
3answers
152 views

Folder to be found using %folder-name%

As we can go to the temp folder by typing %temp% in the run Window.Is there any way to make this command work for our folders as well eg-If we have a folder say SUPER then i want this folder to open ...
2
votes
1answer
185 views

What command sequence can I use to delete directories but not their files?

How do I delete directories but not the files inside them? I have tried the following: rm -di /Users/arthur/Desktop/MyFolder remove /Users/arthur/Desktop/MyFolder? y rm: ...
8
votes
1answer
16k views

How do I find the size of a directory on a Unix-like command-line?

I know this is a very basic question, but I searched the web and did not find a simple answer. I'm sure it's some kind of two or three letter command, right?
6
votes
1answer
433 views

Linux: which is “most appropriate” directory to place an exectuable for all users?

A bit of newb question.. I usually install packages and don't worry about these things. But, now I have a one file executable CLI program (Kindlegen from Amazon). I want it to be in the path of all ...
3
votes
2answers
1k views

Delete locked file/folder from command line

It is easy to delete file or folder from a command line or a locked file or folder from a nice GUI tool like Unlocker. However is there a way to delete locked file/folder from a command line? Is ...
2
votes
1answer
246 views

How to remove a folder with a broken name?

I use Windows Live Mesh to keep my files backed up across many computers, but I have one folder (that I think came from a rar file), called px 2 (with what appears to be a space at the end). This file ...
0
votes
1answer
681 views

Downloading an (apache) online directory locally using cli (wget …)

Not really a question this one - but alternative answers are certainly welcome! :) Sometimes I need to download files listed in an Apache directory listing, say as in: ...
0
votes
1answer
1k views

Setting CMD CD to the directory that the batch was run in

I'm trying to create a batch script that will open a program in a different environment (so I can make a portable version of it). I use this set APPDATA=%CD%\data to tell it to do that. The problem ...
3
votes
2answers
148 views

directory listing is showing “+” sign

In one of my directory listing I get following output: drwxrws---+ 7 sip sip 4096 Aug 5 13:25 USSDG I am the member of the group sip but I am not able to create any file if I ...
1
vote
1answer
192 views

Is there a fast method of changing directory to a symbolic links parent or source?

Say I have folder stucture: |- dir1/ | |- sub1/ | |- dir2/ |- sub1link -> /dir1/sub1/ and my current working directory is sub1link, is there a quick way to either: change directory to ...
6
votes
1answer
4k views

How to copy files inside several folders into another directory

I have 6 CDs with PDF files inside a lot of folders (Like Prep1, Prep2... and so on.) I need to copy all the PDF files inside folders to my C:\ and then burn them all. Is there a command in cmd ...
2
votes
2answers
755 views

Command Line print all file names in directory

I have a directory that contains about 3000 images, what I would like to do is to print out (to a file if possible or even to screen) the whole images names after doing some string formatting and ...
10
votes
3answers
6k views

Can I use the “start” command with spaces in the path?

I have a path like this: Y:\xxx\dd sss\aaa\ccc Y:\ is mapped to an FTP address. Now when I try to use start to open my folder I cannot. Command prompt makes mistake and goes to Y:\xxx\dd folder! I ...
1
vote
2answers
198 views

navigating to a folder shortcut

I have a windows shortcut to a folder, and want to be able to navigate to it in command prompt. Is there a way?
2
votes
2answers
9k views

Unix - List all directories and subdirectories, excluding directories without files

I would like to list all the directories and sub directories in and below the current path. Since I only wanted to display directories I came up with the follwing command: find -type d -exec ls -d1 ...
4
votes
2answers
2k views

Using “find” to list only directories with no more childs

How can only directories be listed, that do not have another child directory? Imagine a structure like /A /A/AA /A/AB /A/AB/ABB /B /C /C/CC /C/CC/CCC /C/CC/CCC/CCCC I would like to use find to list ...
6
votes
1answer
2k views

Setting folder icon in Mac OS X 10.6 via command-line?

I have a file.icns that I would like to set as custom icon for a folder. How can I do it from a script/command-line? The script is executed in the postinstall phase of a package installer. The ...
1
vote
2answers
6k views

Setting a user's home directory on Mac OS X (Server) from the command line

How can I set a user's home directory on Mac OS X Server using the command line?
0
votes
3answers
678 views

print directory using command prompt

Found this one: http://www.watchingthenet.com/how-to-print-a-directory-tree-from-windows-explorer.html But I don't know how do I do it and save the directory listing somewhere. What I want to do is ...
10
votes
7answers
4k views

Easiest way to get right-click “Open command window here” with admin priveleges in Windows 7

I don't want to install PowerToys, I'd rather a simpler solution for this specific problem. I've tried Ctrl+Shift+Right-Click. I've tried adding a registry script, but I get the following error: ...
2
votes
2answers
8k views

XCOPY /Exclude Directory Syntax

I'm trying to use XCOPY to copy a directory that looks like this: -MainFolder -ManyFoldersIWantToCopy -ManyFoldersIWantToCopy -... -Source Code I want to use the /EXCLUDE option to copy every ...
8
votes
4answers
20k views

Open a directory in a Linux GUI file browser via the command line

Is there a way to open a file browser window (in KDE or GNOME or some desktop environment) for a directory while your navigating directories from the terminal? Text editors that have a GUI will open ...
0
votes
3answers
114 views

Copying folders in Windows

I have the following folders on a Windows machine C:\FolderToCopy C:\Dest Both folders are empty. I want to execute a copy operation from a command prompt so that I have this in the end: ...
6
votes
2answers
1k views

tar a directory

I'm trying to tar my website files that are on my test server to be able to upload them to 'real' server. tar -cf mysite.tar /var/www It creates archive fine... but when I open that archive it has ...
2
votes
3answers
219 views

What are the commands to display a numbered list of the files in a directory?

I want to print a numbered list of the file names in a directory. I tried dir /w > test.txt What are the commands to do this?
1
vote
5answers
5k views

Folder comparions on Command line

I want to compare two folders on Windows (Vista, XP) which have large number of huge size files, which i need to compare. If I use Beyond Compare or such tool to compare the folders it is taking a lot ...