Viewing 1 post (of 1 total)
  • Author
    Posts
  • #30224
    Patrick C
    Participant

    Two 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");
    or shell.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.org

    Currently 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

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.