Page 1 of 1 1
Topic Options
#2297 - 2000-03-29 02:11 PM Use of wildcard characters in filename(s)
Anonymous
Unregistered


I'm having the following problem:

When I use a literal filename, let's say: "file0329.txt", I can get my kix script to set a variable and send a message accordingly. However, if I choose to substitute a specific part of the filename, "file????.txt", or "file*.txt" the variable ($Result) will not work.

Here's the part of the script:
= = = = = = = = = = = = = = = = = = = = = =
;previous section ensures that T: is mapped accordingly

If Exist("t:\Program Files\Procomm Plus\Download\file????.txt")
If GetFileSize("t:\Program Files\Procomm Plus\Download\file????.txt") > 62
$Result = GetFileSize("t:\Program Files\Procomm Plus\Download\file????.txt")
sendmessage("user1","File size is good: $Result bytes.")

Else
$Result = GetFileSize("t:\Program Files\Procomm Plus\Download\file????.txt")
sendmessage("user1","File size is too small: $Result bytes.")

EndIf
Else
sendmessage("user1","File does not exist.")

EndIf

:End
quit

= = = = = = = = = = = = = = = = = = = = = =
If set to the literal filename, I get the message: File size is too small: 26 bytes.

If set w/ wildcard characters (file????.txt or file*.txt) I get the message: File size too small: 0 bytes.

Any input would be of assistance. Thanks

Top
#2298 - 2000-03-29 03:12 PM Re: Use of wildcard characters in filename(s)
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
try this following line.

If Exist("t:\Program Files\Procomm Plus\Download\file????.txt") = 1

also you can't use wildcards in GETFILESIZE()


Bryce

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2870 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.1 seconds in which 0.068 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org