Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > zip files in mu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 2189 of 2317
Post > Topic >>

zip files in multiple directories

by tcdrake <rymills@[EMAIL PROTECTED] > Mar 13, 2008 at 12:26 PM

I need help with another 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....

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"

}
 




 2 Posts in Topic:
zip files in multiple directories
tcdrake <rymills@[EMAI  2008-03-13 12:26:39 
Re: zip files in multiple directories
Ted Davis <tdavis@[EMA  2008-03-13 15:17:32 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 20:25:39 CDT 2008.