I'm trying to create a bat files we can use daily to copy or move PDF files from subfolders (names of folder vary daily) to the parent folder. I have tried the below:
First tried to just copy the files using this..didn't work
copy "Y:\Print OPS\Annuity Ops\*\*.pdf" "Y:\Print OPS\Annuity Ops"
Next I tried to make a list of the files to be copied and use that to copy them, the list is created by the files aren't copied.
Echo %date% Sweep Time = %time% File count = %cnt% > 000_testpdf.txt echo.>>000_testpdf.txt dir /b /s *.pdf, /O:N >> 000_testpdf.txt set logfile=MSOffice_PDF.log dir /b /s *.pdf, > 000_testpdf.txt for /f "delims=" %%i in (000_testpdf.txt) do echo D|xcopy "Y:\Print OPS\Annuity Ops\%%i" "Y:\Print OPS\Annuity Ops%%i" /i /z /y