tags:

views:

12

answers:

1

Hi ..

I have a requiremnt in which i have to create a batch file to copy files in a folder that starts with 'ABC' and ends with Current.xls.

for ex:

the files are in the folder

C:\Sample\Source

ABC Great outdoors Current.xls ABC Great outdoors Previous.xls ABC Treading corp Current.xls

i want to copy the files which starts with ABC and ends with Current to a new folder..

i tried using the xcopy command but i dont know how to search for the filenames.

Thanks in advance for ur guidance...

+2  A: 
copy C:\Sample\Source\ABC*Current.xls targetfolder
Frank
@Frank: Oops. I gave a different, and fairly complex answer, then remembered that the copy works on multiple files if you provide the wildcard (*). :) +1
Merlyn Morgan-Graham