also @ TechSpot: Nvidia GeForce GTX 780 Review

Copying files via batch files

Discussion in 'Windows OS' started by Sam23, Mar 26, 2009.

  1. Sam23 Newcomer, in training

    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 TechSpot Maniac Posts: 378

    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 TechSpot Chancellor Posts: 2,069   +15

    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 TechSpot Maniac Posts: 378

    You could also try ROBOCOPY (if you are running Vista)
    Read more at http://en.wikipedia.org/wiki/Robocopy.
  5. Sam23 Newcomer, in training

    Hi
    Thanks for ur solutions but i did with for loop

    Thanks i did with for loop