Более полным (правильным) код должен быть таким:
Код:
@echo off
2>nul wmic path Win32_LogicalDisk where ^(drivetype="2" and mediatype=null^) get name|more +1|set/p n=^& cmd/v/c if exist !n! xcopy/edy "%Userprofile%\Desktop\work\*.txt" "!n: =!\work\"
exit
.