I have a file adapter.txt in 100 different locations(paths).and i am trying to copy althose instances of adapter.txt to a new location(path)
I have written like this
copy C:\myfile\one\adapter.txt C:\Newpath
copy C:\myfile\two\adapter.txt C:\Newpath
copy C:\myfile\three\adapter.txt C:\Newpath
copy C:\myfile\four\adapter.txt C:\Newpath
copy C:\myfile\five\adapter.txt C:\Newpath
.
.
.
.
.
.
.
.
.
copy C:\myfile\hundred\adapter.txt C:\Newpath
However it copies only one instance of adapter.txt instead of all 100 instances
since the file name is only same name of all 100 instances adapter.txt
pls suggest.
copy files
Moderator: DosItHelp
Re: copy files
Add a random number to each filename, but you need to check that it hasn't been used before.
Or use xcopy and the /s switch to create the folder structure too.
Or use xcopy and the /s switch to create the folder structure too.