//flex table opened by JP

Click to See Complete Forum and Search --> : Dos expert please help.


MaMister
12-26-2003, 02:09 AM
Hi,

I have created a simple batch file to backup my folder, using win98.

Here is how it looks like:

md e:\test
copy C:\My Documents\*.* e:\test

It works fine but I want to be more advance like adding date to the backup drive and compress the files.

Tried the date thing but didn't work :
md e:\test %yyyy%-%mmm%-%dd%
copy C:\My Documents\*.* e:\test %yyyy%-%mmm%-%dd%

Anyone ?

Direct1
12-26-2003, 02:31 AM
How about something like this...

@Echo off
xcopy "C:\My Documents\*.*" "E:\Backup\My Documents\*.*" /V /D /Y /S
xcopy "C:\Windows\Microsoft\Outlook\*.*" "E:\Backup\Outlook\*.*" /V /D /Y /S
xcopy "C:\Windows\Favorites\*.*" "E:\Backup\Favs\*.*" /V /D /Y /S
exit

...changing to your paths obviously. This will just copy any new files after you run it more than once. Good luck! :t

MaMister
12-26-2003, 04:30 AM
Thks. Why must we input the command @echo off ?

Direct1
12-26-2003, 04:39 AM
It is not a "must" -- just used so everything doesn't display on the screen when you run it. maybe this will help... @Echo Off help (http://www.ss64.com/nt/echo.html) -- good luck! :t