1.

Solve : Data Backups Using a Batch Program?

Answer»

Hello all, I am a newbie here. I am trying to create a batch file to backup all my users data and settings. We are in an XP environment. I also would like to be able to automatically zip the files and ftp to a LOCAL server on our LAN. Any help is greatly appreciated. Thanks. Copying complete directory trees is done with xcopy /e. See xcopy /? for details.

If you have WinZip, you can use wzzip for zipping files from command line. See wzzip /? for details. (The FOLDER containing wzzip.exe is normally not part of your PATH environment variable -> add it.)

WXP professional should include the ftp command for accessing FTP sites from command line. See your Windows help for details (ftp /? does not work)

Cheers,
[glb]cs[/glb]CS - What I am asking for is more help. I am DOS (command line) iliterate for the most part. Can you help in getting me going in writting the batch file/ftp script etc.? Thanks again for any help.Hi even I am trying to do the same thing. I have gone thru the xcopy command. What I want is that form the current machine, I want to log on to a different machine and backup or copy the entire D: drive to the D: drive in current machine. This is what I wrote in a batch file. Offcourse I am missing somthing. Could anyone help.

xcopy \\remote server\d\ /c /e d:\ backup\

when I type the command in cmd in the machine, it works. What I want to know is how do I write this in a batch file so that the machine LOGS into the reomote machine and STARTS copying.

I looked at start cmd & it starts cmd but how can I write the command in the file so that when the batch file is run, it would open cmd and type the xcopy command.Don't you know how to create a batch file? Start an editor (e.g. notepad) and write your xcopy command. Then save this file with a .bat extension, e.g. backup.bat. You can now double-click on the batch file's icon in the Windows Explorer and the batch file is executed.

Cheers,
[glb]cs[/glb]I do, but in the batch file, how do I type the command after opening cmd.
That is what I am confused aboutThe command it's the name of the bat file.
For example, if you made with EDIT or notepad a file called mycopy.bat with one line in it (it doesn't matter the number of lines):

dir c:

and after that you saved the file and you want to launch the bat file, you have to go in the directory where the file mycopy.bat is (using the command cd for example -- type cd /? in the command prompt for more details) and then type just:

mycopy

or

mycopy.bat

(for safety)
and all the commands in the bat file should be executed (of course, if they are well written, with no errors).
That's the basic, the very basic part of what you can do.


Note: edit
To launch edit, you have to go in command prompt and there type

edit

After that you write everything you need; save the file (be cautious with the file extension) and that's it.



Discussion

No Comment Found