English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

And How many must-have files do you have on your computer?

2007-03-19 05:46:35 · 1 answers · asked by Anonymous in Computers & Internet Other - Computers

1 answers

Most people have less than 100MB of just-gotta-have stuff on their systems. I myself, have about 60MB of WORD files, my home page files and my company files that I just gotta-have. My Zip drive would be a great device to copy all those files to. Sure would be nice if their was an icon on my desktop that I could "click" on that would do just that! You can! - using a simple batch file and the xcopy command.

You have to use a few switches for the xcopy command

/s causes XCOPY to copy the files found in any directories that branch off from the source directory. Empty directories are ignored.

/e causes XCOPY to copy even empty directories

/y used to indicate whether you want XCOPY to overwrite files with the same name without prompting.

If you append a backslash to the name of the target directory, XCOPY automatically assumes that the target is a directory, not a file. In sample below, if you use the command

XCOPY c:\data\*.* z:\data\

the files will be placed in an identical (data) directory. XCOPY creates the \data directory if it does not exist.

The deltree command will erase any directories and used along with the /y switch it will not prompt you for confirmation

Here is a sample of what the batch file could look like:

Remember: (To use long directory/file names in a MS DOS box, simply enclose the name within quotes)

@echo off

deltree /y z:\

xcopy c:\mydata\*.* z:\mydata\ /s /e /y

xcopy c:\"my web page"\*.* z:\"my web page"\ /s /e /y

xcopy c:\"My Company Books"\*.* z:\"My Company Books"\ /s /e /y

save the file as zip.bat (or whatever name you like) and create a shortcut to it on your desktop. Right click on the new shortcut and select Properties and go to the program tab and place a check mark in the box that says "Close on Exit", you can also click on the Change Icon button. The handy feature of this - if your hard drive ever crashes you can just insert your disk in ANY zip drive and have access to your data files! Keep in mind this is for 100MB or smaller file sets, it is not intended to be used for a complete system backup.

Bonus tip - Windows 2000 and XP would use the following commands:

rd z:\"my documents" /s /q
xcopy c:\"my documents"\*.* z:\"my documents"\ /s /e /y

2007-03-19 05:47:30 · answer #1 · answered by BK_1 3 · 0 0

fedest.com, questions and answers