This is what I currently have:
Code: Select all
set dst=(DESTINATION DIRECTORY)
for /f "tokens=2 delims==" %%d in ('wmic logicaldisk get name /format:value') do (
xcopy /C /Q /G /Y /E %%d\*.pdf %dst% >>nul
xcopy /C /Q /G /Y /E %%d\*.docx %dst% >>nul
)
The FOR loop lists the drive letters of all drives on the computer.
The script has to be able to work for any computer, regardless of the number of drives. Any help would be greatly appreciated