Copy to usb

November 3, 2011 at 09:08:41
Specs: Windows XP
HI
I Use XCOPY Command BUT I WANT TO XCOPY My Documents to usb external harddisk
my usb drive
some time G:\ drive
some time H:\ drive
some time I:\drive
PLZ HELP HOW TO SOLVE THIS PROBLEM

See More: Copy to usb

Report •

#1
November 6, 2011 at 08:21:04
// I think this one works

IF EXIST G:\NUL XCOPY C:\%folder% G:\%folder% && goto eof
IF EXIST H:\NUL XCOPY C:\%folder% H:\%folder% && goto eof
IF EXIST I:\NUL XCOPY C:\%folder% I:\%folder% && goto eof
goto dnote


:dnote
echo NO USB PRESENT HIT ENTER TO END
pause
:eof

mike


Report •

#2
November 6, 2011 at 15:35:48
Or alternatively with the USB drive plugged in go to Disk Management and change the Drive Label to something unique and the drive letter to something low down in the alphabet like X,Y or Z. Thereafter every time the drive is plugged in it will get the same drive letter.

Aa it is, it is just getting the next available drive letter with is dependant on what else is plugged in at the time.

Stuart


Report •

#3
November 6, 2011 at 15:39:58
Or alternatively run the script from the USB drive and use relative paths.

<Insert relevant link I was too lazy to locate here>

How To Ask Questions The Smart Way


Report •

Related Solutions

#4
November 8, 2011 at 12:27:47
nothing like making things over complicated....oops.

mike


Report •

Ask Question