Fri, 13 Aug 2004 20:09:14 +0200 (2:09 PM EDT here) Alexander S. Kunz wrote:
> I just found out my problem is different. My beloved :) music player
> allows me to create a file in the style of "now playing..." - I
> wanted to check wether this file exists, and if it does, include it
> below my signature, and otherwise include a cookie.
> However, if the player isn't playing a thing, the file still exists,
> but is empty (0 bytes). So an "if exists" doesn't help me very much,
> I'd rather need to check the size of the file... I suppose that can
> be done with a RegEx but this is exceeding my capabilites by far (so
> far:-) ...
First, download Gaijin's gMacroPlugin and plug it into TheBat!. Then
the Quick Template will do what you want to do.
In the Quick Template, Gaijin's macro %GMP_FileSize returns the size
(in bytes) of the file C:\temp\yourfile.txt .
%IF puts the file C:\temp\yourfile.txt in your message, if yourfile is
bigger than 0 bytes.
%REM=" begin QT "
%IF(%GMP_FileSize("C:\temp\yourfile.txt")>"0",%-
%PUT="c:\temp\yourfile.txt")%-
%REM=" endn QT "
Using: The Bat! v2.12.00, BayesIt! 0.5.5, MyMacros 1.11
Windows 2000 v5.0 - Build 2195 - Service Pack 4
--
Daniel A. Grunberg Kensington, Maryland, USA
homepage: www.nyx.net/~dgrunber/
________________________________________________
Current version is 2.12.00 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html