Talk About Network



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 > Re: incrementin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 16 Topic 2179 of 2241
Post > Topic >>

Re: incrementing numbers

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

On Mar 6, 1:25=A0pm, tcdrake <rymi...@[EMAIL PROTECTED]
> wrote:
> We recieve zip files in the following format...yyyymmdd-#.zip where #
> starts at 1 and increments up to 79. I need to unzip these files into
> seperate folders based on a specified folder name. Here is what I
> have....
>
> BEGIN{
> timetab(z,time() - 86400)
>
> printf("c:\\progra~1\\winzip\\wzunzip.exe -e -s %s%02s%02s-.zip c:\
> \test\\1\n",z["YEAR"],z["MONTH"],z["DAY"]) =A0> "test.bat"
> printf("c:\\progra~1\\winzip\\wzunzip.exe -e -s %s%02s%02s-.zip c:\
> \test\\2\n",z["YEAR"],z["MONTH"],z["DAY"]) =A0> "test.bat"
>
> }
>
> As you can see I have the date portion down its the # after the dash
> in the zip name I don't know how to do. I'm pretty sure I need the ++
> but not sure how.
>
> thanks.


I think I need to add more info....

We have 80 zip files coming into one FTP directory each day labled
yyyymmdd-(store number).zip. These will then need to be extracted to
the folder associated to each location. The location folder name is
random and does not match the store number in the zip name. So from
what I gather one way would be to scan the FTP incoming directory to
get the ZIP names, not sure how to do this in awk. I also need to
figure out how to match the zip to the correct folder it needs to be
extracted to. Any ideas?




 16 Posts in Topic:
incrementing numbers
tcdrake <rymills@[EMAI  2008-03-06 11:25:29 
Re: incrementing numbers
tcdrake <rymills@[EMAI  2008-03-06 12:44:23 
Re: incrementing numbers
Ted Davis <tdavis@[EMA  2008-03-06 15:47:19 
Re: incrementing numbers
tcdrake <rymills@[EMAI  2008-03-07 06:01:26 
Re: incrementing numbers
tcdrake <rymills@[EMAI  2008-03-07 07:25:05 
Re: incrementing numbers
tcdrake <rymills@[EMAI  2008-03-07 07:32:06 
Re: incrementing numbers
Ted Davis <tdavis@[EMA  2008-03-07 15:04:41 
Re: incrementing numbers
Ted Davis <tdavis@[EMA  2008-03-07 19:58:45 
Re: incrementing numbers
tcdrake <rymills@[EMAI  2008-03-07 07:41:51 
Re: incrementing numbers
tcdrake <rymills@[EMAI  2008-03-07 13:06:05 
Re: incrementing numbers
tcdrake <rymills@[EMAI  2008-03-10 07:22:41 
Re: incrementing numbers
tcdrake <rymills@[EMAI  2008-03-12 12:46:29 
Re: incrementing numbers
Ted Davis <tdavis@[EMA  2008-03-12 15:04:55 
Re: incrementing numbers
tcdrake <rymills@[EMAI  2008-03-12 13:23:37 
Re: incrementing numbers
Ted Davis <tdavis@[EMA  2008-03-12 20:03:31 
Re: incrementing numbers
tcdrake <rymills@[EMAI  2008-03-26 06:48:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Sat May 17 4:25:11 CDT 2008.