Answers:
您可以创建一个自动运行文件,其中包含此代码以从PC复制文件。
%backupcmd% "%USERPROFILE%\pictures" "%drive%\all\My pics"
因此,如果您在引号中切换两个代码,它将从USB复制文件。像所以。
%backupcmd% "%drive%\all\My pics" "%USERPROFILE%\pictures"
或者你可以尝试:
@echo on :: variables SET odrive =%odrive:~0,2%set backupcmd = xcopy / s / c / d / e / h / i / r / y echo on%backupcmd%“%USERPROFILE%\ Favorites”“ %drive%\ backup \ favorites“%backupcmd%”%USERPROFILE%\ Desktop * .jpg“”%drive%\ backup \ img“%backupcmd%”%USERPROFILE%\ Desktop * .jpeg“”%drive%\ backup \ img“%backupcmd%”%USERPROFILE%\ Desktop * .bmp“”%drive%\ backup \ img“%backupcmd%”%USERPROFILE%\ Desktop * .3gp“”%drive%\ backup \ vid“%backupcmd%” %USERPROFILE%\ Desktop * .mp4“”%drive%\ backup \ vid“%backupcmd%”%USERPROFILE%\ Desktop * .avi“”%drive%\ backup \ vid“%backupcmd%”%USERPROFILE%\ Desktop * .wmv“”%drive%\ backup \ vid“%backupcmd%”%USERPROFILE%\ Contacts“”%drive%\ backup \ contacts“%backupcmd%”%USERPROFILE%\ Links“”%drive%\ backup \ links“%backupcmd%”%USERPROFILE%\ My Documents \ My Music“”%drive%\ backup \ mp3“%backupcmd%”%USERPROFILE%\ My Documents \ Downloads “”%drive%\ backup \ downloads“%backupcmd%”%USERPROFILE%\ My Music“”%drive%\ backup \ mp3“%backupcmd%”%USERPROFILE%\ My Documents * .jpg“”%drive%\ backup \ img“%backupcmd%”%USERPROFILE%\ My Documents * .bmp“”%drive%\ backup \ img“%backupcmd%”%USERPROFILE%\ My Documents * .avi“”%drive%\ backup \ vid“% backupcmd%“%USERPROFILE%\ My Documents * .mpg”“%drive%\ backup \ vid”%backupcmd%“%USERPROFILE%\ My Documents * .3gp”“%drive%\ backup \ vid”%backupcmd%“% USERPROFILE%\ My Documents * .mp4“”%drive%\ backup \ vid“%backupcmd%“%USERPROFILE%\ My Pictures”“%drive%\ backup \ img”%backupcmd%“%USERPROFILE%\ Videos”“%drive%\ backup \ vid”%backupcmd%“%USERPROFILE%\ Music”“ %drive%\ backup \ mp3“%backupcmd%”%USERPROFILE%\ Downloads“”%drive%\ backup \ downloads“%backupcmd%”D:.jpg“”%drive%\ backup \ img“%backupcmd%”D: .jpeg“”%drive%\ backup \ img“%backupcmd%”D:.bmp“”%drive%\ backup \ img“%backupcmd %“D: .3gp”“%drive%\ backup \ vid”%backupcmd%“D:.mp4”“%drive%\ backup \ vid”%backupcmd%“D: .avi”“%drive%\ backup \ vid“%backupcmd%”D:*。wmv“”%drive%\ backup \ vid“@echo on cls