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 a
time).
> 
> ~      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
> 
> > I just use the winzip command line tool every day to turn the 1 day
> > old "log" file into a "zip" file by the SAME name in the SAME
> > location.  This way, you can simply move anything *.zip to a different
> > drive, while *.log are "current" log files.
> >
> > Here is the content of my Compress2DayOldLogs.cmd file:
> >
> > C:
> > CD "C:\WINNT\system32\LogFiles\"
> > FOR /R %%f in (ex*.log) do "C:\Program Files\WinZip\WZzip.exe" -m -ex
> -Td01
> > %%~dpnf.zip %%f
> 
> OK, can some one please explain the logic of this line. This appears to be
> what I need to do. My understanding is that it is only calling the winzip
> command to a specific file name.
> 
> John T
> eServices For You
> 
> "Seek, and ye shall find!"
> 
> 
> ---
> This E-mail came from the Declude.JunkMail mailing list.  To unsubscribe,
> just send an E-mail to [EMAIL PROTECTED], and type "unsubscribe
> Declude.JunkMail".  The archives can be found at
> http://www.mail-archive.com.
> 
> ---
> This E-mail came from the Declude.JunkMail mailing list.  To
> unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
> type "unsubscribe Declude.JunkMail".  The archives can be found
> at http://www.mail-archive.com.

---
This E-mail came from the Declude.JunkMail mailing list.  To
unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
type "unsubscribe Declude.JunkMail".  The archives can be found
at http://www.mail-archive.com.

Reply via email to