How to move a file to a USB drive that has a variable drive letter range dependant on the machine it could be drive E, F, G or H, in Windows Embedded XP, there is only ever one USB drive installed at a time, so it can move only if it is fitted, I can create the file and it moves in Windows 7 but not in Windows Embedded XP, what are the differences in the options available for this in XP, the script will only be used on XP machines.
REM ------ Creation of the ZIP file ------
%SupervisorPath%\7-ZipPortable\App\7-Zip\7z a -tzip %BackupPath%\Backup\%FileStamp%.zip %BackupPath%\Backup\
REM ------ Move the backup file to a USB drive with File Name and Date Stamp ------
for %%A in (E F G H) do if exist %%A: (
echo Moving files to USB drive %%A:
move /y "%BackupPath%\Backup\%FileStamp%.zip" %%A: >nul && (
echo Files moved to USB drive successfully
goto :break
)
)
:break
Can I also create an error message if the file is not moved and then delete the file, as it takes up valuable space on the drive?