|
forrestzheng01
初级用户
 
积分 22
发帖 7
注册 2006-9-4
状态 离线
|
『楼 主』:
请各位大侠指教,谢谢
使用 LLM 解释/回答一下
在我们单位有一些老员工,不那么会用电脑,经常把重要的文件放在桌面,加上机子经常出问题,重要的数据统统完蛋~ 虽然我们多次提醒他们不要放桌面,可他们就是不注意,很让人头痛~
于是我写了个批处理放在启动项,好每次开机自动备份桌面文件
xcopy "E:\Documents and Settings\wind"/e d:\backup
执行后会出选择项 <yes/no/all?> 问时候改写(覆盖)之前的数据,本来就是按个 "a" 就OK的事情,那些老顽固居然还说麻烦,不会~
我要需要解决的问题就是,如何 才能不显示<yes/no/all?>
而直接执行啊?
本人是菜鸟,刚接触dos,请各位大虾指教啊~~
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~
|
|
2006-9-5 20:40 |
|
|
electronixtar
铂金会员
      
积分 7493
发帖 2672
注册 2005-9-2
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
echo a| xcopy "E:\Documents and Settings\wind"/e d:\backup
echo a| xcopy "E:\Documents and Settings\wind"/e d:\backup
|

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>" |
|
2006-9-5 22:06 |
|
|
forrestzheng01
初级用户
 
积分 22
发帖 7
注册 2006-9-4
状态 离线
|
|
2006-9-6 02:27 |
|
|
namejm
荣誉版主
       batch fan
积分 5226
发帖 1737
注册 2006-3-10 来自 成都
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
xcopy 命令不是有强制覆盖而不用提醒的参数吗?直接加参数 /y 就可以了。
Does the `xcopy` command have a parameter to force overwriting without prompting? Just add the parameter `/y`.
|

尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。 |
|
2006-9-6 02:49 |
|
|
forrestzheng01
初级用户
 
积分 22
发帖 7
注册 2006-9-4
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
呵呵~原来还有这功能啊~ 谢拉
Hehe~ So there is this function~ Thanks
|
|
2006-9-6 04:03 |
|
|
forrestzheng01
初级用户
 
积分 22
发帖 7
注册 2006-9-4
状态 离线
|
『第 6 楼』:
请问改如何改良啊?请各位大虾指教
使用 LLM 解释/回答一下
我写了一个简单的批处理,用于开机备份桌面与我的文档的文件,如下:
@echo off
xcopy "E:\Documents and Settings\wind\桌面"/e/q d:\backupd\桌面 /y
xcopy "E:\Documents and Settings\wind\My Documents"/e/q d:\backupd\文档 /y
这个批处理能正常执行,但用了一段时间,发现问题是:
1.每次开机都自动备份,有时一天重启几次,文件又多,耗时间,请问怎么可以设置为1天备份一次啊
2.已经删除的文件,备份文件里面依然存在,随着其他新增的文件,时间一长备份数据越来越大,手动删除很麻烦,请问能不能设定 ,保持备份文件与原文档保持一致 ? (即原文档已经删除的,备份文件也能自动删除)
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)
|
|
2006-9-6 20:49 |
|
|
forrestzheng01
初级用户
 
积分 22
发帖 7
注册 2006-9-4
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
这个问题应该不难吧?:( 请指点下拉
This question shouldn't be too difficult, right? :( Please give me some pointers.
|
|
2006-9-6 23:05 |
|
|
vkill
金牌会员
     
积分 4103
发帖 1744
注册 2006-1-20 来自 甘肃.临泽
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
2.已经删除的文件,备份文件里面依然存在,随着其他新增的文件,时间一长备份数据越来越大,手动删除很麻烦,请问能不能设定 ,保持备份文件与原文档保持一致 ? (即原文档已经删除的,备份文件也能自动删除)
这个我想要生成个xcopy 日至,用日至来完成同步删除
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.
|
|
2006-9-7 01:12 |
|
|
xuantian
高级用户
   
积分 587
发帖 282
注册 2006-4-10
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
用xp自带的备份程序(开始->附件->系统工具->备份),什么都用批处理解决还用 XP 干嘛
Using the backup program that comes with XP (Start -> Accessories -> System Tools -> Backup), if everything is solved with batch processing, why use XP?
|
|
2006-9-7 01:22 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
用RAR压缩备份吧!
下列更新备份之后改变了的文件。
@echo off
"C:\Program Files\WinRAR\RAR" u -ep1 -r -m0 d:\backupd\桌面.rar "E:\Documents and Settings\wind\桌面\*"
"C:\Program Files\WinRAR\RAR" u -ep1 -r -m0 d:\backupd\文档.rar "E:\Documents and Settings\wind\My Documents\*"
压缩率调整
-m0 存储 添加到压缩文件时不压缩文件。
-m1 最快 使用最快方式(低压缩)
-m2 较快 使用快速压缩方式
-m3 标准 使用标准(默认)压缩方式
-m4 较好 使用较好压缩方式(较好压缩,但是慢)
-m5 最好 使用最大压缩方式(最好的压缩,但是最慢)
Use RAR to compress and back up!
The following updates and backs up the files that have changed.
@echo off
"C:\Program Files\WinRAR\RAR" u -ep1 -r -m0 d:\backupd\桌面.rar "E:\Documents and Settings\wind\桌面\*"
"C:\Program Files\WinRAR\RAR" u -ep1 -r -m0 d:\backupd\文档.rar "E:\Documents and Settings\wind\My Documents\*"
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)
|
|
2006-9-7 01:38 |
|
|
forrestzheng01
初级用户
 
积分 22
发帖 7
注册 2006-9-4
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
请问二楼的,生成xcopy日志怎么做啊?? 能不能做做三个文件,如a,b,c , ]
第一天备到a,
第二天也备到a,而第一天的自动转到b,
第三天,.....
即一个备份 保留三天
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.
|
|
2006-9-7 02:42 |
|
|
forrestzheng01
初级用户
 
积分 22
发帖 7
注册 2006-9-4
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
5楼 楼主的意思我不明白啊,可以解释一下么?我还是菜鸟啊~
The meaning of the building owner on the 5th floor, I don't understand. Can you explain it? I'm still a newbie~
|
|
2006-9-7 02:45 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
───────────────── 版主提示 ─────────────────
为了便于论坛用户浏览和版主管理,请您修改本主题的标题,以简要叙述主题的内容或意图
如果您确认标题不需要修改,请继续回复该主题进行申辩,若申辩理由充分,将取消该通知
如果您确认标题需要修改,请点击该主题首帖下方"编辑"按钮,在编辑页面中修改标题栏
在得知您做出积极恰当的回应后,版主将在三个工作日内删除本提示以消除对您的不利影响
───────────────── 版主提示 ─────────────────
───────────────── 版务记录 ─────────────────
执行:Will Sort
操作:合并主题 {22971}请问改如何改良啊?请各位大虾指教 -> 6~12 楼
说明:操作主题与本主题存在上下文的直接联系
处罚:因属论坛新人,不予积分处罚
提示:请访问 {7326}论坛新手必读,所有人的基本行为准则
───────────────── 版务记录 ─────────────────
───────────────── 版务记录 ─────────────────
执行:Will Sort
操作:移动主题:自 DOS疑難解答 & 問題討論(解答室)
说明:依照主题内容分类,更适合于发表在此版区
处罚:因属论坛新人,不予积分处罚,请访问 {7326}论坛新手必读,所有人的基本行为准则
───────────────── 版务记录 ─────────────────
Re forrestzheng01:
更有效和快捷的办法是将用户的桌面目录重定位到指定的数据盘中。这可以使用超级魔法兔子等优化工具来实现,也可以通过注册表脚本或批处理修改注册表中的相关键值。
Last edited by willsort on 2006-9-9 at 11:22 ]
───────────────── 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 ]
|

※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2006-9-9 11:05 |
|
|
kennyfan
中级用户
  
积分 259
发帖 112
注册 2006-9-18
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
哈哈,学到新招,rar备份!
Haha, learned a new trick, RAR backup!
|
|
2006-9-18 20:55 |
|