I'm trying to put a files time-date stamp into a str to compare later
on. Instead of getting, for example a file created today, todays
date-time on the file, I'm getting Thu Jan 01 1970 12:00 am ???
str newsdate
int newsfile time
FOPEN newsfile O_RDONLY "e:\sbbs\xtrn\news.txt"
FGET_TIME newsfile time
TIME_STR newsdate time
FCLOSE newsfile
I'm trying to put a files time-date stamp into a str to compare later
on. Instead of getting, for example a file created today, todays
date-time on the file, I'm getting Thu Jan 01 1970 12:00 am ???
laterI'm trying to put a files time-date stamp into a str to compare
FGET_TIME is not implemented in Synchronet v3 (I don't remember the reason).>Use the GET_FILE_TIME function instead, which is much simplier and doesn't
> > str newsdate
> > int newsfile time
> >
> >
> > FOPEN newsfile O_RDONLY "e:\sbbs\xtrn\news.txt"
> > FGET_TIME newsfile time
> > TIME_STR newsdate time
> > FCLOSE newsfile
FGET_TIME is not implemented in Synchronet v3 (I don't remember the reaso>Use the GET_FILE_TIME function instead, which is much simplier and doesn'
>require opening and closing the file.
I can't get this...! (DAMN!) The above makes sense to me but
GET_FILE_TIME <int_var> <str_var> doesn't, and seems opposite of what I need. How do I get "e:\sbbs\xtrn\news.txt" into <str_var> to use in
this function, and then that date/time into my newsdate string?
That should work. What did you try?^^^^^^^^^^^^^^^^^
str fname>int ftime
That should work. What did you try?
Holy crap! What genius decided to use /'s instead of normal \'s ??
> > I can't get this...! (DAMN!) The above makes sense to me but
> > GET_FILE_TIME <int_var> <str_var> doesn't, and seems opposite of what
> > need. How do I get "e:\sbbs\xtrn\news.txt" into <str_var> to use in
> > this function, and then that date/time into my newsdate string?
str fname>int ftime
>str newsdate
>set fname "e:/sbbs/xtrn/news.txt"
>get_file_time ftime fname
>time_str newsdate ftime
That should work. What did you try?
Holy crap! What genius decided to use /'s instead of normal \'s ??
No wonder I've had such a hard time...!
Why is this and how long has it been a secret?
(prg works great now btw, thanks! :)
(PS. I was also using SETSTR instead of SET)
Holy crap! What genius decided to use /'s instead of normal \'s ?? No wonder I've had such a hard time...! Why is this and how long has it
been a secret? (prg works great now btw, thanks! :)
> > I can't get this...! (DAMN!) The above makes sense to me but
> > GET_FILE_TIME <int_var> <str_var> doesn't, and seems opposite of what
> > need. How do I get "e:\sbbs\xtrn\news.txt" into <str_var> to use in
> > this function, and then that date/time into my newsdate string?
str fname>int ftime
>str newsdate
>set fname "e:/sbbs/xtrn/news.txt"
>get_file_time ftime fname
>time_str newsdate ftime
That should work. What did you try?
Holy crap! What genius decided to use /'s instead of normal \'s ?? No wonder I've had such a hard time...! Why is this and how long has it
been a secret? (prg works great now btw, thanks! :)
(PS. I was also using SETSTR instead of SET)
RE: FGET_TIME
BY: Ace to DIGITAL MAN on Sat Feb 16 2002 12:49 pm
Holy crap! What genius decided to use /'s instead of normal \'s ?? No wonder I've had such a hard time...! Why is this and how long has it been a secret? (prg works great now btw, thanks! :)
That is the UNIX C compiler again. UNIX uses a forward slash, and since C i used to build UNIX, many 'C' compilers use a forward slash.
If you are usin
an editor written in 'C' like EMacs, you have to use forward slashes in the file descriptors. It gets somewhat confusing forward slashing the filenames and backslashing the shell command moves, but you get used to it!
Sysop: | Tandy |
---|---|
Location: | New York, USA |
Users: | 15 |
Nodes: | 13 (0 / 13) |
Uptime: | 65:08:10 |
Calls: | 335 |
Messages: | 113,199 |