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....
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.
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(in the code I have it 1 and 2). 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?
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....
Code:
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"]) > "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"]) > "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.
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(in the code I have it 1 and 2). 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?