|
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 |
1. Changing the timestamp on a file ? #11793 Posted by: DougA 2007-09-11 01:31:13 Last edited by: Jeff Glatt 2009-03-04 14:57:50 (Total edited 1 time) |
Is there a way to change the timestamp (date and time) of a file? Doug |
2. #11810 Posted by: Jeff Glatt 2007-09-12 02:17:36 Last edited by: Jeff Glatt 2009-03-04 14:57:09 (Total edited 1 time) |
Use the FILEDATE function. |
3. After a search, I found the above refernece to FILEDATE #13229 |
but couldn't find any help on using it. I assume it's what I want - I want to copy a file fro A to B and ensure that the date/time for B is shown as "right now" (rather than A's date/time which seems to be happening for me) |
4. #13230 Posted by: DougA 2010-03-04 05:06:15 |
Michael, when I highlight "filedate" in RPC, and hit F1, the help page comes up. In short the structure is: FILEDATE(filename, option, datetime) where option is: 'A' - Last accessed, 'C' - Creation, 'M' - Last modified and time is "yyyymmdd hh:mm:ss" If time is omitted, the the function is a query and returns the specified value.Doug |
5. Obviously don't have the latest online help, 'cos I DON'T see any info for FILEDATE #13231 |
At the same time, I tried going to http://home.roadrunner.com/~jgglatt/rexx/rexxuser.htm (from the sticky updates topic) to get the latest help, but that is either in trouble or temporarily down. |
6. Tried the example you specified (?) #13232 Posted by: Michael S 2010-03-04 16:00:42 Last edited by: Michael S 2010-03-04 16:01:01 (Total edited 1 time) |
filename = "K4605020.cbl"
y = filedate(filename)
SAY y
and received err 43.1 "Could not find routine ......../filedate.rex"
Am I missing something ? |
7. #13233 Posted by: DougA 2010-03-06 04:01:26 |
The link must have been down, as it's working for me. I'd suggest reloading the software as well as the doc.Doug |
8. Thanks for the suggestion Doug. #13234 |
That did the trick (Reginald must have been updated without my noticing) |
9. Okay - I installed updated Reginald, but it still failed #13235 |
Here's my test example
filename = "K4605020.cbl"
y = filedate(filename)
SAY y
temp = DATE("S")" "TIME("N")
SAY "temp = "temp
y = filedate(filename, "M", temp)
SAY y
Temp contains "20100308 09:51:40", but the results are shown in the attachment |
10. Tried the sample, it worked for me #13244 Posted by: DougA 2010-03-12 01:20:58 |
Michael, ran your test example and it worked fine, maybe Jeff can help. Or try another reload of the software, something seems confused. Anyway, your code is good, should work.Doug |
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 |