0

Hi I am looking for a (simple) batch script for Windows XP to copy pdf files with different filenames but having the same reference numbers in their filenames to a specific folder in a different drive.

E.g.

Copy all pdf's with reference number 111 to folder "test"

Source files in F drive

F:\folder 1\filename 1_111.pdf
F:\folder 1\folder 2\filename 2_111.pdf

Destination folder in C drive

C:\test\

I am a novice, so thank you in advance for your help.

Regards, Olive

4

1 回答 1

1

这是另一种选择:

@echo off
for /f "delims=" %%a in ('xcopy /l /e /y "F:\folder 1\*111*.pdf" "c:\test\" ^|find ":"') do copy "%%a" "c:\test"
于 2013-07-26T04:42:07.577 回答