5 replies
by srobieson Accepted solution
by robo_dev Accepted solution
What are you trying to do, exactly?
I'm guessing that your question has something to do with volume mount points used in Windows 2000 and later...there's a program that's part of windows called mountvol that could be used in a dos batch file.
therefore, the way to see the volume name for a d: drive would be
mountvol d: /L
by srobieson Accepted solution
I am trying to create a batch file to backup user info on thumb drive prior to re-image. The USB device gets assigned a different drive letter depending on number of installed or mapped drives. Drive is labeled USB.
%backupcmd% "%USERPROFILE%\Favorites" d:\
by rob miners Accepted solution
by rob miners Accepted solution
@echo off
:: variables
set path=%~dp0Backup;%path%
set drive=%~dp0Backup
set backupcmd=xcopy /s /c /d /e /h /i /r /k /y
if not exist "%drive%\Backup" mkdir "%drive%\Backup"
:: echo ### Backing up My Documents...
if not exist "%drive%\My Documents" mkdir "%drive%\My Documents"
%backupcmd% "%USERPROFILE%\My Documents" "%drive%\My Documents"
echo ### Backing up email and address book (Outlook Express)...
if not exist "%drive%\Address Book" mkdir "%drive%\Address Book"
%backupcmd% "%USERPROFILE%\Application Data\Microsoft\Address Book" "%drive%\Address Book"
if not exist "%drive%\Outlook Express" mkdir "%drive%\Outlook Express"
%backupcmd% "%USERPROFILE%\Local Settings\Application Data\Identities" "%drive%\Outlook Express"
echo ### Backing up email and contacts (MS Outlook)...
if not exist "%drive%\Outlook" mkdir "%drive%\Outlook"
%backupcmd% "%USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook" "%drive%\Outlook"
:: echo ### Backing up the Registry...
:: if not exist "%drive%\Registry" mkdir "%drive%\Registry"
:: if exist "%drive%\Registry\regbackup.reg" del "%drive%\Registry\regbackup.reg"
:: regedit /e "%drive%\Registry\regbackup.reg"
:: use below syntax to backup other directories...
:: %backupcmd% "...source directory..." "%drive%\...destination dir..."
echo Backup Complete!
This discussion is closed to new replies.
Trending Hardware posts
Sort by Trending