Hi All,
I have a question for the script writers out there......
My scripting skills are a little rusty!
I have a batch file I want to run as part of my startup routine.
I use an external drive (L:\) which is to be the target folder for the backed up files, into a folder L:\ste into which I would like to copy my C:\ste (and subdirectories).
I want this batch file to only copy items that have been modified / created since the last backup run, then list the changes made.
I would like to add an option to require the batch file to check if the L: drive is connected, and if not, then pause until the drive is connected, then resume when a key is pressed.
What I have so far is as follows:
~~~~~~~~~~~~~~~~~~~
Start of batch file
@echo off
# md "L:\ste"
c:
Cd\ste
echo.
echo.
echo ######## PLEASE WAIT SYSTEM BACKING UP SOME DATA########...
echo.
echo.
xcopy /c /e /i /r /k /y /m "C:\ste" "L:\ste"
L:
cd\ste
echo.
echo.
echo ########### Creating file list ##############
dir *.* /s /w
dir *.* /s >>L:\ste\backup.txt
echo.
echo.
echo !!!!!!!!BACKUP COMPLETED THANKS!!!!!!!!
echo.
echo.
@pause
End of batch file
~~~~~~~~~~~~~~~~~~~~
I have a question for the script writers out there......
My scripting skills are a little rusty!I have a batch file I want to run as part of my startup routine.
I use an external drive (L:\) which is to be the target folder for the backed up files, into a folder L:\ste into which I would like to copy my C:\ste (and subdirectories).
I want this batch file to only copy items that have been modified / created since the last backup run, then list the changes made.
I would like to add an option to require the batch file to check if the L: drive is connected, and if not, then pause until the drive is connected, then resume when a key is pressed.
What I have so far is as follows:
~~~~~~~~~~~~~~~~~~~
Start of batch file
@echo off
# md "L:\ste"
c:
Cd\ste
echo.
echo.
echo ######## PLEASE WAIT SYSTEM BACKING UP SOME DATA########...
echo.
echo.
xcopy /c /e /i /r /k /y /m "C:\ste" "L:\ste"
L:
cd\ste
echo.
echo.
echo ########### Creating file list ##############
dir *.* /s /w
dir *.* /s >>L:\ste\backup.txt
echo.
echo.
echo !!!!!!!!BACKUP COMPLETED THANKS!!!!!!!!
echo.
echo.
@pause
End of batch file
~~~~~~~~~~~~~~~~~~~~
Last edited: