1.

Solve : Copy with wildcard?

Answer»

I have multiple files with very similar names in a folder and would LIKE to be able to pick a specific file by using CHARACTERS in the middle of the file name and copy that file to a DIFFERENT folder using the copy command in a .bat file.

For example: All files start with 20060403_ and end with _999999.txt.

Next month they will start with 20060531_and end with _999999.tx

20060430_6301499004509_326187.txt
20060430_6301499012509_326188.txt
20060430_6301499053509_326189.txt

Next month they will all start with 20060531.

I would like to writ a .bat file that will select the second file with 6301499012509 and copy to anothe folder. What syntax would I use?? I have tried a variety of ways but the syntax is always incorrect. Is it possible to do this.

Thanks so muchcan you clarify your QUESTION ? Because I don't see why you WANT to use a wildcard.

AlmnQuote

I have multiple files with very similar names in a folder and would like to be able to pick a specific file by using characters in the middle of the file name and copy that file to a different folder using the copy command in a .bat file.

For example: All files start with 20060403_ and end with _999999.txt.

20060430_6301499004509_326187.txt
20060430_6301499012509_326188.txt
20060430_6301499053509_326189.txt

I would like to select the second file with 6301499012509 and copy to anothe folder. What syntax would I use?? I have tried a variety of ways but the syntax is always incorrect. Is it possible to do this.

Thanks so much

hmm ... how about this :
copy 20060430*326188*


Discussion

No Comment Found