Author Topic: Help for File Creation & Modification Date Issue...  (Read 7070 times)

0 Members and 1 Guest are viewing this topic.

Rick

  • Guest
Help for File Creation & Modification Date Issue...
« on: February 19, 2013, 09:57:30 PM »
Is there a way to NOT modify the File Modification Date / Creation Date, when using "Set Open Option & Password Security, etc."?

I see the "Keep file date modified attribute unchanged" option in other settings but not for those.

For example, I have tax files in pdf that I want to keep the (ORIGINAL) modified and creation date as is, but add Open Options and Password Security to the files.

If you could add this, I'd appreciate it....I can't figure out the scripts section or even if that would work for that purpose, etc.

Thanks a lot for the help.

Rick

*sorry I previously posted in PDF Explorer...my mistake...

RTT

  • Administrator
  • *****
  • Posts: 918
Re: Help for File Creation & Modification Date Issue...
« Reply #1 on: February 19, 2013, 11:17:37 PM »
I suppose you are talking about the file system file dates attributes. The PDF metadata ones are already kept unchanged.
Currently there is no way to do it, but then it's something I will add to a next version.

At least for the file modification date, and if the PDF metadata modification date is relevant, you can use the next My Scripts JScript to set it back equal to the one in the metadata.

Code: [Select]
var objShell = new ActiveXObject("shell.application");
var objFolder2;
for (var i = 0; i < pdfe.SelectedFiles.Count; i++) {
    var Item = pdfe.SelectedFiles(i);
    if (Item.Metadata.ModificationDate != undefined) {
        var n = Item.Filename.lastIndexOf('\\') + 1;
        var filepath = Item.Filename.substr(0, n);
        var filename = Item.Filename.substr(n);

        var objFolder2 = objShell.NameSpace(filepath);
        if (objFolder2 != null) {
            var objFolderItem = objFolder2.ParseName(filename);
            if (objFolderItem != null) {
                objFolderItem.ModifyDate = Item.Metadata.ModificationDate;
            }
        }
    }
}

Rick

  • Guest
Re: Help for File Creation & Modification Date Issue...
« Reply #2 on: February 20, 2013, 12:57:28 AM »
Thanks a lot RTT...saving certain file's modification date or creation date...especially for important files is needed.  They would change to current date if Password Security or Open Options are selected.

I'll wait for the next version...I am not familiar with using the scripts...

Thanks a LOT! ;)

Rick