Questions

Windows XP Script

Tags:
+
0 Votes
Locked

Windows XP Script

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"

TIA

SM
  • +
    0 Votes
    efs710920mex

    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.

    +
    0 Votes
    shiva00

    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..

    TIA

    SM

    +
    0 Votes
    neilb@uk

    Mental abberation caused by exposure to Vista...

    +
    0 Votes
    neilb@uk

    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.

    Neil

    +
    0 Votes
    shiva00

    it worked thanks alot..

    +
    0 Votes
    Toivo Talikka

    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.

    +
    0 Votes
    binunice

    Hi,

    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...

    Regards
    Binu

  • +
    0 Votes
    efs710920mex

    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.

    +
    0 Votes
    shiva00

    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..

    TIA

    SM

    +
    0 Votes
    neilb@uk

    Mental abberation caused by exposure to Vista...

    +
    0 Votes
    neilb@uk

    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.

    Neil

    +
    0 Votes
    shiva00

    it worked thanks alot..

    +
    0 Votes
    Toivo Talikka

    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.

    +
    0 Votes
    binunice

    Hi,

    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...

    Regards
    Binu