Following on from lasts week tip about Robocopy, if you are backing up to a USB drive there is a chance that every time you use the drive (maybe on different machines) under Windows you get a different drive letter.
So if you have a batch file saved on the drive with your finely crafted backup script, it may fail if your drive D:\ is now drive E:\
Enter to the rescue just the variable you need:
%~d0
Which gives you the path to the file in which the script is being run from,
so something like
robocopy \\my-server\files %~d0\backupfolder /mir
saved as ‘backup.bat’ in the root of your usb drive will work everytime.
Comments by
The Best Christmas Tape in the World…Ever (52 of the best Bloopers, spoofs and funny bits)
This was a great montage. I'm still a PAMS ...
Using current drive letter in batch script on a usb drive which changes drives letters
few issues: 1) do not rely on th btch file ...
Podcasts and the back catalogue problem
[…] I’ve been listening to podcasts for more than a ...
In the beginning there was nothing … the radio revolution grows up
Hi Phil, yes the T&T report was indeed me, my ...
About
[…] About […]