Web Development



Windows XP Script

By shiva00 ·
Hi I was wondering if I could get some help to create a script for Windows XP to go through a Folder say "f:/Music" and sll subfolders and copy all files to the folder "f:/Music". Or in other words move all files in subfolders in "f:/Music" to "f:/Music"



This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Create a batch file.

by efs710920mex In reply to Windows XP Script

Open a text editor (notepad) and write the commands you want. In this case you need to write:
copy "F:\Music" to "F:\Music"

or whatever folder you want. The only restriction is that the folder must already exist. If it doesn't, the first create it by:
mkdir "F:\Music"

Then save the file and change its extention to .bat
Whenever you click on that file, it will copy the files.

Collapse -

Nothing happened

by shiva00 In reply to Windows XP Script

nothing happened with the copy f:/music to f:/music command / batch file..to be more clear i was trying to get all the files in f:/Music and subdirectories to f:/Music1..both directories exist.. f:/Music has about 3700 files in various subdirectories and f:/Music is empty. and i don't want any subdirectories in f:/Music1..



Collapse -

Post edited out because it was crap

by neilb@uk In reply to Nothing happened

Mental abberation caused by exposure to Vista...

Collapse -

This time I read your question properly :)

by neilb@uk In reply to Nothing happened

command line:
for /R f:\music %i in (*) do move "%i" f:\music

Batch file:
for /R f:\music %%i in (*) do move "%%i" f:\music

This will move all files from anywhere in the f:\music subtree into the root folder f:\music. it will move them one at a time but that shouldn't be an issue unless you've thousands.


Collapse -

Thanks for the help!!!

by shiva00 In reply to This time I read your que ...

it worked thanks alot..

Collapse -


by Toivo Talikka In reply to Windows XP Script

The syntax is:
copy f:\music\*.* f:\music1

The problem is that it does not copy from subdirectories, you will need to use the format:

copy f:\music\subdirectory\*.* f:\music1

The XCOPY command is more versatile (type in xcopy /? to find out the syntax) but you would also need to specify each subdirectory in order to merge the files into one folder.

Collapse -

Use search

by binunice In reply to Copy


Do a search for all audios in you folder. Remember to select search in sub-folders. After the search completes, select all files and cut (Ctrl+A & Ctrl+X) then open the folder f:\music1 and paste it. Simple...


Related Discussions

Related Forums