|
John, I would suggest taking a second look at Dean's reply. The "forfiles" command acts on the date of the file and not the time stamp, so therefore you won't be having issues with timestamps. It also has the ability to go through an entire directory tree and use wildcards to find the files, and then it passes the file names in to the chained app (WinZip command line) for execution. This is about as simple as it gets. You could do the entire task in one line of code. The only caveat is that I am not sure whether or not Windows 2000 comes with forfiles, but I'm sure that you could always copy the executable over from Windows 2003 if needed. Matt John T (Lists) wrote: What is defining %%f? John T eServices For You"Seek, and ye shall find!"-----Original Message----- From: [EMAIL PROTECTED] [mailto:Declude.JunkMail- [EMAIL PROTECTED]] On Behalf Of Andy Schmidt Sent: Wednesday, April 19, 2006 3:26 PM To: [email protected] Subject: RE: [Declude.JunkMail] OT: Help with WinZip command line Hi John, The FOR/DO will iterate through the directory listing using "ex*.log" and then perform a WINZIP for each item. The /R makes it recursive (meaning, including subfolders) - which is what you want. &&f is one item in the directory list (the path to one log file at atime).~ modifies an item from the directory list, specifically: ~dpn takes only the drive, path and filename (leave out the extension) So: %%~dpnF.zip means, take the directory item %%F, put use only the drive:/Path/Filename and append ".zip". In other words the Winzip command will look like that WINZIP -m -ex -Td01 c:\Path\exDDMMYY.log c:\Path\exDDMMYY.zip. for each of youu log files in all of your subfolders. Best Regards Andy Schmidt Phone: +1 201 934-3414 x20 (Business) Fax: +1 201 934-9206 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of John T (Lists) Sent: Wednesday, April 19, 2006 06:09 PM To: [email protected] Subject: RE: [Declude.JunkMail] OT: Help with WinZip command line |
- Re: [Declude.JunkMail] OT: Help with WinZip command line Matt
- RE: [Declude.JunkMail] OT: Help with WinZip command ... John T \(Lists\)
- RE: [Declude.JunkMail] OT: Help with WinZip command ... Andy Schmidt
