I'm a newbie, so bear with me...
I am trying to copy all .doc
files that I have scattered throughout several subdirectories of one main directory into another directory using a batch file. I have managed to get a filelist.txt
of all the files (there are hundreds) out of these directories that I want to copy using:
"C:Main directorysub directory"
dir /b /s *.doc > "C:Main directorysub directoryfilelist.txt"
What script would I use to xcopy those into one directory? Can I use some code that actually grabs those file names from filelist.txt
and xcopies them?
For reference, I looked at the question below because it looked like it was doing what I want to do, but it didn't work for me.
Using xcopy to copy files from several directories to one directory
Also, I would really like to understand this concept, so please break down the code for me to tell me what each item does, or at least include a link that will explain it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…