3 replies
by seanferd
but you'd have to define which files you actually want, which, in the end, may involve listing each file individually.
I'm not sure I see a way to pipe a list from a text file directly to the xcopy command. You might have to write a batch file to do this using For...In...Do...
Ah, here's an example:
http://www.itnewsgroups.net/group/microsoft.public.windows.server.general/topic34064.aspx
More:
http://www.computing.net/answers/programming/batch-copy-files-using-txt-list/18010.html
General:
http://home.att.net/~gobruen/progs/dos_batch/dos_batch.html#batch_util
On the other hand, if you had a text file of all the files in the directories that you don't want to copy, the xcopy /exclude would work well.
I've had a look at the utility xxcopy (which is a nice xcopy replacement), but it lacks this functionality as well.
Good luck.
P.S.
If these files would tend to group themselves in the Explorer GUI (choose Details View) by sorting by date, name, etc. by clicking on the detail columns, then just copying from Explorer may be faster
by sporzondek
by nicknielsen
The command
"dir [i]drive\path\filename.ext[/i] /s"
will list all the files in the specified directory and all subdirectories.
To send the output to a file, use the redirect symbol ">".
Use the /b switch to save only the filename.ext
Your command would look something like:
[pre]dir d:\path\file*.ext /s /b > destfile.ext[/pre]
This discussion is closed to new replies.
Trending Software posts
Sort by Trending