home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
rxhll.zip
/
FILESYS.REX
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-12-01
|
1KB
|
45 lines
/* #include <filesystem.rex> */
CompareFileTimes: procedure
/**
*** This returns a boolean that indicates if the datetime stamps from
*** first file is older than the datetime stamp from the second file.
*** the file formats are the syntax from the SysFileTree
**/
parse arg Stamp.1, Stamp.2
do i = 1 to 2
parse var Stamp.i mon '/' day '/' year hour ':' temp
parse var temp min 3 meridian
hour = right(hour,2,'0')
mon = right(mon,2,'0')
if hour = 12 then hour = 0
if meridian = 'p' then
hour = hour + 12
CompareStamp.i = year||mon||day||hour||min
end
select
when CompareStamp.1 < CompareStamp.2 then
return '<'
when CompareStamp.1 > CompareStamp.2 then
return '>'
otherwise
return '='
end /* select */
return '='
QualifiedDirectory: procedure
/**
*** This determines if the file passed is a directory
**/
parse arg DirSpec
Current = directory() /* Save current directory */
NewDir = directory(DirSpec) /* Get the fully qualified name */
Current = directory(Current) /* Restore directory */
return NewDir