China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-04 08:52
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » ZIP backup by folder name (asking for advice) View 789 Replies 1
Original Poster Posted 2007-04-23 10:25 ·  中国 广东 珠海 电信
初级用户
潜水&&搜索
Credits 70
Posts 28
Joined 2007-04-22 14:36
19-year member
UID 86095
Gender Male
Status Offline
I have another question for everyone:

Under a parent directory var there are 3 folders: var-2007-15 var-2007-16 var-2007-17

Here, the var in the folder name and 15, 16, 17 (weeks) are all variables.
VAR can take several values: BT, BP, AC, AV, TT, FCP, and the week variable is known as %week%.

Now I want to make ZIP compressed backups of the three subdirectories separately. I hope to first determine var and enter the corresponding directory, then determine the folder name var-2007-week number (week numbers 15, 16, 17.....), and perform the corresponding operation.

For example: if Var=BP and week number=15, then enter the BP\BP-2007-15 folder for compressed backup. If Var=BP, week number=16, then go to BP\BP-2007-16 for compression.
If Var=TT and week number=17, then back up the TT\TT-2007-17 folder.


How can this be done? Thanks, everyone

[ Last edited by Dana on 2007-4-22 at 09:32 PM ]
Floor 2 Posted 2007-04-24 01:48 ·  中国 广东 深圳 电信
初级用户
潜水&&搜索
Credits 70
Posts 28
Joined 2007-04-22 14:36
19-year member
UID 86095
Gender Male
Status Offline
Bump this a bit, after messing with it for half the day I've gotten myself completely confused..........
Forum Jump: