Retrieving Filedate in REXX? 
Author Message
 Retrieving Filedate in REXX?

        I am very new to REXX, yet I am somewhat familiar with C, so
I am catching on quickly.  What I am in need for is some way to retrieve
the filedate of a particular file.. is there any easy way to go about doing this?

        Also, is there an 'easy' way to check if a file exists?

        Thanks in advance.

Swordfish



Sat, 12 Jul 1997 15:49:43 GMT  
 Retrieving Filedate in REXX?
You did not specify your environment.  The following assumes OS/2.
You could do it by queueing the results of the DIR command:
"DIR" FileId "|RXQUEUE"
or you could use the SysFileTree function, which basically does this for
you.
Quote:
>...some way to retrieve the filedate of a particular file..



Sat, 12 Jul 1997 16:46:18 GMT  
 Retrieving Filedate in REXX?

Quote:

>    I am very new to REXX, yet I am somewhat familiar with C, so I
>am catching on quickly.  What I am in need for is some way to
>retrieve the filedate of a particular file.. is there any easy way to
>go about doing this?
>    Also, is there an 'easy' way to check if a file exists?

SysFileTree is a function included in the RexxUtil dll that comes with
OS/2's rexx.  The online help for this function is fairly extensive
and should cover what you need.

rexxlib from Quercus has the function DosFileInfo() which will also
get the job done, but that is shareware (you gotta pay for it).
SysFileTree should meet the requirements you put forth above.

--




Sun, 13 Jul 1997 05:56:53 GMT  
 Retrieving Filedate in REXX?

Quote:

>    I am very new to REXX, yet I am somewhat familiar with C, so
>I am catching on quickly.  What I am in need for is some way to retrieve
>the filedate of a particular file.. is there any easy way to go about doing this?

>    Also, is there an 'easy' way to check if a file exists?

>    Thanks in advance.

>Swordfish


------------- file test.cmd ---------------
/* */
Exists =  stream('test.cmd','c','query exists')
Say 'Exist is' Exists          /* will return null string if don't exist.
                                  if exists return full path of filename. */

DateTime = stream('test.cmd','c','query datetime')
Say 'Date  is' DateTime
-------------------------------------------
[C:\]test
Exist is C:\test.cmd
Date  is 01-24-95  23:36:34

hope this may help,
Xtian.



Sun, 13 Jul 1997 12:39:04 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Retrieving Filedate in REXX?

2. Retrieving file info with Rexx

3. network Rexx API's for setting and retrieving informatio

4. network Rexx API's for setting and retrieving information under

5. Help: Retrieving Variable from TKRadioButton, Using Rexx TK

6. Error#87: cif$filedate - any ideas? CW2003

7. how to set filedate?

8. Filedate on Win NT

9. Getting Filedate and Time on Unix Sys

10. REXX in WINDOWS/REXX Add-ins/VISUAL REXX ????

11. Retrieving the name of defined operator operands

12. How to retrieve (in assembler) the disk space allocated to a data set

 

 
Powered by phpBB® Forum Software