0

I am looking for a batch code that will transfer all files inside folders. Then it will transfer them into the location.

D:\Transfered Files\

And it will keep the exact folder/file names.

For example I want everything transfered from

C:\Users\
C:\Program Files\
edinvnode
  • 3,497
  • 7
  • 30
  • 53

1 Answers1

1

I have tried this and it works:

xcopy source destination /Y

Just save this in a batch file of course change the directories as you see fit.

Also note that the '/Y' parameter says that if files exist in the destination overwrite them. If you remove it, it will ask you about each file separately.

If you think this isn't good enough you can use robocopy:

robocopy source destination

Again you need to change the source and the destination directories and put the line in batch file.

I have used both and both works 100%. I have a windows 7 home premium 64x.

Yousef_Shamshoum
  • 787
  • 3
  • 12
  • Okey this worked but I have one more request. I want entire source folder copied. Not just files in it. If source folder is C:\test1\ and destination is D:\destination\ I want it to be D:\destination\test1\files.txt Is this possible. – edinvnode Sep 22 '14 at 15:41
  • 1
    I couldn't find any way to do that, but what I think might help maybe put the folder you want to copy in another folder and then just copy that folder's content... for example instead of c:\source put the folder in another folder c:\folder\source and then copy c:\folder – Yousef_Shamshoum Sep 23 '14 at 07:47