How would I get the file extention into a varrible?
[Example]
Contest.845 file name,
^^
which would change from week to week as part of the extention (last
two digits are the week of the year).
If your reply doesn't show how to get the file name into a varrible,
how might that be done, too.
advThanksance.
In the I'm-gonna-hate-myself-in-the-morning dept...I downloaded Jas'
oneliner program (with .SRC) and am actually learning from it. Thanks.
With regards to the social ramifications;Digital Man wrote to Finnigann <=-
Re: Varrible assignments
By: Finnigann to All on Sat Sep 08 2007 10:42 am
How would I get the file extention into a varrible?
[Example]
Contest.845 file name,
^^
which would change from week to week as part of the extention (last
two digits are the week of the year).
If your reply doesn't show how to get the file name into a varrible,
how might that be done, too.
advThanksance.
In the I'm-gonna-hate-myself-in-the-morning dept...I downloaded Jas'
oneliner program (with .SRC) and am actually learning from it. Thanks.
If the filename portion is fixed-length (e.g. always "Contest", 7
chars), then the following would work:
str extension
copy extension filename
shift_str extension 7 # filename portion is always 7 chars
str extension # defining varrible 'extention' as a string# right?
copy extension filename # I'm gonna have to hard code the filename
shift_str extension 7 # filename portion is always 7 chars
With regards to the social ramifications;Digital Man wrote to Finnigann <=-
Re: Varrible assignments
By: Finnigann to All on Sat Sep 08 2007 10:42 am
How would I get the file extention into a varrible?
[Example]
Contest.845 file name,
^^
which would change from week to week as part of the extention (last
two digits are the week of the year).
If your reply doesn't show how to get the file name into a varrible,
how might that be done, too.
advThanksance.
In the I'm-gonna-hate-myself-in-the-morning dept...I downloaded Jas'
oneliner program (with .SRC) and am actually learning from it. Thanks.
If the filename portion is fixed-length (e.g. always "Contest", 7 chars), then the following would work:
str extension
copy extension filename
shift_str extension 7 # filename portion is always 7 chars
Would the dot count as a space?
contest.845
12345678
str extension # defining varrible 'extention' as a string copy extension filename # I'm gonna have to hard code the filename# right?
shift_str extension 7 # filename portion is always 7 chars
The filename (CONTEST) stays the same, will wild cards work in BAJA for
the extention?
copy extention contest.??? # Making sure that there are never more
# than one file name in the work dir.
With regards to the social ramifications;Digital Man wrote to Finnigann <=-
Re: Re: Varrible assignments
By: Finnigann to Digital Man on Sat Sep 08 2007 11:18 pm
If the filename portion is fixed-length (e.g. always "Contest", 7
chars), then the following would work:
str extension
copy extension filename
shift_str extension 7 # filename portion is always 7 chars
Would the dot count as a space?
It's a character, yeah.
contest.845
12345678
Yeah, I usually think of the dot as part of the extension. Shift 8
chars if you don't want the dot in your string.
str extension # defining varrible 'extention' as a string copy extension filename # I'm gonna have to hard code the filename# right?
shift_str extension 7 # filename portion is always 7 chars
The filename (CONTEST) stays the same, will wild cards work in BAJA for
the extention?
In strings, any/all characters are valid.
copy extention contest.??? # Making sure that there are never more
# than one file name in the work dir.
I'm not really sure what you're trying to do there. If you want to find
if a file exists on disk, using wildcards, use the CHKFILE function or
the OPEN_DIR/READ_DIR/CLOSE_DIR functions.
Sysop: | Chris Crash |
---|---|
Location: | Huntington Beach, CA. |
Users: | 578 |
Nodes: | 8 (0 / 8) |
Uptime: | 02:50:35 |
Calls: | 10,736 |
Files: | 5 |
Messages: | 443,451 |