Copy files using a partial filename

October 6, 2010 at 12:44:47
Specs: Windows XP
How do I run a batch file to copy a file or set of files that begin with a certain filename?

Example:

I want to copy the filename "678779 - Hutch.pdf" but want to copy it based solely on the first set of numbers. This way if I have multiple files set up for that number, 678779, it copies all of them from that directory.


See More: Copy files using a partial filename

Report •


#1
October 6, 2010 at 12:51:10
Try this:

set Location= Location Goes Here
set Number=678779
copy "%Number%*" "%Location%"


Report •

#2
October 6, 2010 at 12:58:18
Excellent that worked, thank you

Report •

Related Solutions


Ask Question