- AuthorPosts
- May 9, 2025 at 9:16 am #30224
Patrick C
ParticipantTwo Shell object functions would be useful:
1) File rename or move.
Application: Rename an existing file as a backup before overwriting.
E.g.shell.RenameFile("d:\\mypath\\myfile.txt", "backup_myfile.txt");
orshell.MoveFile("d:\\mypath\\myfile.txt", "d:\\backups\\backup_myfile.txt");
2) Read a file’s modification date / time.
Application: Detect outdated files.
E.g.shell.GetFileDate("d:\\mypath\\myfile.txt");
A standardised string as a return value would be ideal.
E.g. “1995-12-17T03:24:00” as in developer.mozilla.orgCurrently I’m using
shell.Run(…)
based workarounds.
→ No urgency from my side.For anyone interested in the workaround functions (jsee V8 scripts):
os_renameFile(fPath, newName); // Rename the file in fPath to newName.
os_getFileModDate(fPath); // fPath’s modified date / time as a JavaScript Date() object - AuthorPosts
- You must be logged in to reply to this topic.