will be helpful for those in need I use a Windows command prompt for primary navigation on my Window 7 development machine, and my daily process requires me to get from one location to another in the directory structure quite frequently. I notice that I use 'cd ..' frequently to move to ancestor directories in the directory structure. Is there any solution to reducing the typing cost of multiple sequential 'cd ..' commands? For instance, if I could type a command that would move me up x ancestors up into the directory structure, then I wouldn't need to type 'cd ..' x times.
SET /a times=%1 2>NUL
IF NOT DEFINED times SET /a times=1
IF %times%==0 (CD "%~1") else (FOR /l %%i IN (1,1,%times%) DO CD ..)
In Windows command prompt, copy one file (or multiple files) to multiple directories that have a user specified name
wish helps you Quite a few times each month, I have to copy a set of files from one folder to multiple folders. As the amount of folders to copy the files to is constantly increasing, I've been trying to find a way to automate the copy process. My problem is that I need to copy the files only to folders with a certain name.
src = 'source_folder'
name = 'D_folder_name'
#In your case this would be something like C:\\A
top = 'root_folder for destination'
for root, dirs, files in os.walk(top):
if name in dirs:
for filename in glob.glob(os.path.join(src, '*.*')):
this will help You can't run a folder name in the command prompt like you can in explorer; you have to tell the shell what you want to do with it. If you want to to change directories to the console, use cd YourFolder
Volume in drive C has no label.
Directory of C:\Users
2014-07-17 17:47 <DIR> .
2014-07-17 17:47 <DIR> ..