In this example, we’re trying to move PDF files that have AB, BC & CD starting at the 5 character position.

EXAMPLE SCRIPT NAME: “move.bat”
REM Creates temp.txt with filenames that have AB, BC & CD
DIR /B SENT\????AB*.pdf >> C:\temp.txt
DIR /B SENT\????BC*.pdf >> C:\temp.txt
DIR /B SENT\????CD*.pdf >> C:\temp.txt

REM Copies files from temp.txt to PDF Archive
FOR /f %%a in (C:\temp.txt) do MOVE /y SENT\%%a X:\

REM Temp file clean up
DEL temp.txt