Batch issues

blend2000

New Member
Well first off I would like to say hello, this is my first post here.

I havent known where to turn so if no one can help here please refer me to the best place to go, it would be really appritiated.

Basically I am trying to create a batch file which backs up files from mine or anyone elses who installs it, usb flash drive. I have sucessfully completed it but the option to enter your drive name of your device comes up every time it is used. I wondered if there is a way to only make that run if there was no directory previously entered.

In otherwords, it would only ask for your drive name once unless it could not find a drive.

thanks
 
sorry about that, here goes:

@echo off
rem the following allows for custom string
cls
echo.
echo If you are using this from home
set /p store=Enter String:
echo.%store%
echo.
cls
rem the copy from folder settings
md c:\"documents and settings\all users\desktop\kfile"
md %store%\backup
xcopy c:\"documents and settings\all users\desktop\kfile" %store%\backup /m /e /y
echo Thank you for using the KFile script
pause

The first portion is where the issue is. I would like for it to skip the custom string portion if a string has already been set by the user. In other words if the skrip recognizes that there are files located in two locations.

hope that makes sence.
 
Back
Top