![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-02 03:36 |
48,037 topics / 350,122 posts / today 2 new / 48,250 members |
| DOS批处理 & 脚本技术(批处理室) » Please ask experienced people for advice, thank you |
| Printable Version 1,998 / 13 |
| Floor1 forrestzheng01 | Posted 2006-09-05 20:40 |
| 初级用户 Posts 7 Credits 22 | |
|
In our unit, there are some old employees who are not very good at using computers. They often put important files on the desktop, and plus the computer often has problems, all important data are completely lost~ Although we have reminded them many times not to put them on the desktop, they just don't pay attention, which is very headache~
So I wrote a batch file and put it in the startup item, so that the desktop files are automatically backed up every time the computer starts xcopy "E:\Documents and Settings\wind" /e d:\backup After execution, there will be an option <yes/no/all?> asking whether to rewrite (overwrite) the previous data. It was originally a matter of just pressing "a", but those old-fashioned people even said it was troublesome and didn't know how~ The problem I need to solve is how to not display <yes/no/all?> and directly execute it~ I am a novice, just started to contact DOS, please give me some advice, great gods~ |
|
| Floor2 electronixtar | Posted 2006-09-05 22:06 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
echo a| xcopy "E:\Documents and Settings\wind"/e d:\backup
|
|
| Floor3 forrestzheng01 | Posted 2006-09-06 02:27 |
| 初级用户 Posts 7 Credits 22 | |
| Floor4 namejm | Posted 2006-09-06 02:49 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
Does the `xcopy` command have a parameter to force overwriting without prompting? Just add the parameter `/y`.
|
|
| Floor5 forrestzheng01 | Posted 2006-09-06 04:03 |
| 初级用户 Posts 7 Credits 22 | |
|
Hehe~ So there is this function~ Thanks
|
|
| Floor6 forrestzheng01 | Posted 2006-09-06 20:49 |
| 初级用户 Posts 7 Credits 22 | |
|
I wrote a simple batch script to back up the desktop and My Documents files when the computer starts, as follows:
@echo off xcopy "E:\Documents and Settings\wind\Desktop" /e /q d:\backupd\Desktop /y xcopy "E:\Documents and Settings\wind\My Documents" /e /q d:\backupd\Documents /y This batch script can execute normally, but after using it for a while, the problems are found: 1. It automatically backs up every time the computer starts. Sometimes it restarts several times a day, and there are many files, which takes time. How can I set it to back up once a day? 2. Files that have been deleted are still present in the backup files. As other new files are added, the backup data becomes larger and larger over time, and it is cumbersome to delete manually. Can it be set to keep the backup files consistent with the original documents? (That is, files deleted in the original documents can also be automatically deleted in the backup files) |
|
| Floor7 forrestzheng01 | Posted 2006-09-06 23:05 |
| 初级用户 Posts 7 Credits 22 | |
|
This question shouldn't be too difficult, right? :( Please give me some pointers.
|
|
| Floor8 vkill | Posted 2006-09-07 01:12 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
|
2. The files that have been deleted are still present in the backup files. As other new files are added, the backup data becomes larger over time, and it is cumbersome to delete manually. May I ask if it is possible to set it so that the backup files are consistent with the original documents? (That is, if the original document has been deleted, the backup file can also be automatically deleted)
I want to generate an xcopy date to complete the synchronous deletion using the date. |
|
| Floor9 xuantian | Posted 2006-09-07 01:22 |
| 高级用户 Posts 282 Credits 587 | |
|
Using the backup program that comes with XP (Start -> Accessories -> System Tools -> Backup), if everything is solved with batch processing, why use XP?
|
|
| Floor10 fastslz | Posted 2006-09-07 01:38 |
| 铂金会员 Posts 2,315 Credits 5,493 From 上海 | |
|
Use RAR to compress and back up!
The following updates and backs up the files that have changed. Compression ratio adjustment -m0 Store Do not compress files when adding to the compressed file. -m1 Fastest Use the fastest method (low compression) -m2 Faster Use the quick compression method -m3 Standard Use the standard (default) compression method -m4 Better Use a better compression method (better compression but slow) -m5 Best Use the maximum compression method (best compression but slowest) |
|
| Floor11 forrestzheng01 | Posted 2006-09-07 02:42 |
| 初级用户 Posts 7 Credits 22 | |
|
Excuse me, the person on the second floor, how to generate an xcopy log? Can you make three files, such as a, b, c. On the first day, back up to a. On the second day, also back up to a, and the first day's automatically transfer to b. On the third day,... That is, one backup keeps three days.
|
|
| Floor12 forrestzheng01 | Posted 2006-09-07 02:45 |
| 初级用户 Posts 7 Credits 22 | |
|
The meaning of the building owner on the 5th floor, I don't understand. Can you explain it? I'm still a newbie~
|
|
| Floor13 willsort | Posted 2006-09-09 11:05 |
| 元老会员 Posts 1,512 Credits 4,432 | |
|
───────────────── Moderator Prompt ───────────────── To facilitate forum user browsing and moderator management, please modify the title of this thread to briefly describe the content or intention of the thread. If you confirm that the title does not need to be modified, please continue to reply to this thread to make a plea. If the plea is well-founded, this notice will be canceled. If you confirm that the title needs to be modified, please click the "Edit" button below the first post of this thread and modify the title field in the editing page. After knowing that you have made a positive and appropriate response, the moderator will delete this prompt within three working days to eliminate the adverse impact on you. ───────────────── Moderator Prompt ───────────────── ───────────────── Moderation Record ───────────────── Executor: Will Sort Operation: Merge thread {22971} How to improve? Please give your advice -> Posts 6~12 Explanation: The operated thread has a direct context connection with this thread Punishment: No points punishment due to being a forum newbie Prompt: Please visit {7326}Forum Newcomer Must-read, Basic Code of Conduct for Everyone ───────────────── Moderation Record ───────────────── ───────────────── Moderation Record ───────────────── Executor: Will Sort Operation: Move thread: From DOS Difficulties & Problem Discussion (Q&A Room) Explanation: According to the content classification of the thread, it is more suitable to be posted in this forum section Punishment: No points punishment due to being a forum newbie, please visit {7326}Forum Newcomer Must-read, Basic Code of Conduct for Everyone ───────────────── Moderation Record ───────────────── Re forrestzheng01: A more effective and quick way is to relocate the user's desktop directory to the specified data disk. This can be achieved using optimization tools such as Super Rabbit, or by modifying the relevant key values in the registry through a registry script or batch processing. [ Last edited by willsort on 2006-9-9 at 11:22 ] |
|
| Floor14 kennyfan | Posted 2006-09-18 20:55 |
| 中级用户 Posts 112 Credits 259 | |
|
Haha, learned a new trick, RAR backup!
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |