I need some help with a script.
Here is the directory structure.
c:\ftp\2
3
4
5
etc....
In each of the folders 2,3,4,5,etc are files I need to zip up and name
to todays date. Below is what I have to zip but it only works if I but the AWK created exe and batch file in each directory. I would like one master file to run it all. Below is what I have so far....
Any ideas?
Here is the directory structure.
c:\ftp\2
3
4
5
etc....
In each of the folders 2,3,4,5,etc are files I need to zip up and name
to todays date. Below is what I have to zip but it only works if I but the AWK created exe and batch file in each directory. I would like one master file to run it all. Below is what I have so far....
Code:
BEGIN{
i=1
timetab(z,time() - 86400)
while (i < 2) {
yesterday = time()-(i*86400)
timetab(y,yesterday)
printf("if exist em.dbf ren em.dbf em%s%02s%02s.dbf
\n",substr(y["YEAR"],3,2),y["MONTH"],y["DAY"]) > "get.bat"
printf("if exist gnd.dbf ren gnd.dbf td%s%02s%02s.dbf
\n",substr(y["YEAR"],3,2),y["MONTH"],y["DAY"]) > "get.bat"
printf("if exist gn.dbf ren gn.dbf ln%s%02s%02s.dbf
\n",substr(y["YEAR"],3,2),y["MONTH"],y["DAY"]) > "get.bat"
i++
}
printf("c:\\progra~1\\winzip\\wzzip -m %s%02s%02s.zip *.dbf
\n",z["YEAR"],z["MONTH"],z["DAY"]) > "get.bat"
Any ideas?