[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: how to get back deleted material?



Make one batch file, schedule it, and you are done!
Yes, I've been doing that for years. And also have Carbonite (which is only
medium good, but better than not having it).
Here's my .bat file. It assumes the external drive has been permanently
assigned the letter M. And it assumes you're using 4DOS, and want to
eliminate some temporary files. The only backing up line is:

xcopy c:\*.* /c /e /f /d /y m:\

The switches explained:
/c ignore errors, skip uncopyable files (like the swap file) and continue with next file
/e copy subdirectories, even empty ones
/f Displays full source and destination file names while copying.
/d copy source to destination only if it's not already there or if source version is newer
/y suppress any prompts about overwriting


@echo off
vol m:       <=== find out the name of the M: drive
input Is m: the proper backup drive? (-/n) %%resp <=== check w. user
if "%resp" == "n" quit
cdd c:\  <==== 4DOS command that combines C: and CD \
c:\4dos\kstack.com <==== get ready to automatically give a "y" to a prompt from DOS
del c:\xy\*.tmp <==== might as well clean up stuff at the same time
del c:\xy\xytmp\*.tmp
keystack 0 "y" 13 <=== gives the "y" to the prompt about whether to delete all
del c:\windows\temp\*.*
keystack 0 "y" 13
del m:\windows\temp <=== delete whole damn directory, now that it's cleaned out
  rem NOW DO ACTUAL COPYING
xcopy c:\*.* /c /e /f /d /y m:\ <=== copy any files newer than those on drive, ignore "errors" (like inability to copy the swap file and certain 'in use' system files) date > m:\today <=== put current date/time into a file named "today" on backup drive


Harry Binswanger
hb@xxxxxxxx