Copying files via batch files

By Sam23 ยท 4 replies
Mar 26, 2009
  1. Hello
    I want to make a batch file which will copy the files from directory and its sub-sub-directory & put into other directory with no sub-directory.Please help me.
    Advance thanks for the solutions
  2. lopdog

    lopdog TS Maniac Posts: 295

    Does it have to be a batch file? If you're running XP or Vista you could just open the directory containing files and subdirectories, and do a search for *.*
    That should show all files (and folders) in the current directory. Sort by type, select the files you need and copy them all to another directory.
  3. gbhall

    gbhall TechSpot Chancellor Posts: 2,431   +77

    Try using XCOPY in your batch file, with parameter /s and /e also if you want the directory sub-structure copied as well, even if empty. Start windows help and key XCOPY for a list of all the (many) parameters supported. This is XP. Neither know nor care if it is still there in Vista
  4. lopdog

    lopdog TS Maniac Posts: 295

    You could also try ROBOCOPY (if you are running Vista)
  5. Sam23

    Sam23 TS Rookie Topic Starter

    Thanks for ur solutions but i did with for loop

    Thanks i did with for loop
Topic Status:
Not open for further replies.

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...