![]() |
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-09 04:57 |
47,811 topics / 349,895 posts / today 0 new / 48,253 members |
| DOS批处理 & 脚本技术(批处理室) » [Help] How to back up files and folders by time period!! |
| Printable Version 957 / 7 |
| Floor1 xiaohangdos | Posted 2008-07-14 12:07 |
| 初级用户 Posts 10 Credits 27 | |
|
Folders aa , bb
Copy the files generated under folder aa from 2 to 5 o'clock today to the folder generated under bb from 2 to 5 o'clock today. Then copy the files and folders generated under folder bb from 2 to 5 o'clock today to the server... I'm not capable enough to write it out, so I'm asking everyone here!! |
|
| Floor2 bat-zw | Posted 2008-07-14 12:13 |
| 金牌会员 Posts 1,276 Credits 3,105 | |
|
What day is "today"?
Hehe, couldn't you give a few more conditions? Don't make the person helping you have to assume the conditions themselves. |
|
| Floor3 HAT | Posted 2008-07-14 14:55 |
| 版主 Posts 5,017 Credits 9,023 | |
|
For reference only
|
|
| Floor4 bat-zw | Posted 2008-07-14 16:11 |
| 金牌会员 Posts 1,276 Credits 3,105 | |
|
Whoa, hat, aren't you making it too complicated? You even brought the registry into it.
|
|
| Floor5 HAT | Posted 2008-07-14 16:19 |
| 版主 Posts 5,017 Credits 9,023 | |
|
I was considering that the date/time format might be different from the OP's, and I was too lazy to ask, so I just did it the hard way, hehe.
|
|
| Floor6 xiaohangdos | Posted 2008-07-14 21:51 |
| 初级用户 Posts 10 Credits 27 | |
|
Sorry, I didn't explain it clearly..
Because data has to be collected every day... so "today" means the current system date.. For example, if today is July 14 (Ghost Festival, sheesh) find all files and folders generated in folder aa on July 14 from 2 to 5 o'clock. If found, copy them into a folder under bb Otherwise, just end... ----------------------------------------------------------- As for "a folder under bb," if there are files under aa generated from 2 to 5 o'clock, then "a folder under bb" will be generated. This folder is automatically generated by the system and named with a string of numbers, so the folder name is unknown..... It can only be judged by creation time... Not sure if this makes it clearer.... [ Last edited by xiaohangdos on 2008-7-14 at 09:52 PM ] |
|
| Floor7 bat-zw | Posted 2008-07-16 09:35 |
| 金牌会员 Posts 1,276 Credits 3,105 | |
|
The conditions given by the OP still aren't enough. There's no way around it, I can only make assumptions myself:
aa and bb are both folders under d:\test, and the system time format is 2008-07-16 Wednesday 8:40:21.46 [ Last edited by zw19750516 on 2008-7-16 at 09:49 AM ] |
|
| Floor8 xiaohangdos | Posted 2008-07-16 13:01 |
| 初级用户 Posts 10 Credits 27 | |
|
Seems like it doesn't work..
But thanks to the poster above.... I'll just learn slowly and write it myself later.. |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |