RTTSoftware Support Forum

PDF-ShellTools => Ideas/Suggestions => Topic started by: Rick on February 19, 2013, 09:57:30 PM

Title: Help for File Creation & Modification Date Issue...
Post by: Rick 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...
Title: Re: Help for File Creation & Modification Date Issue...
Post by: RTT 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;
            }
        }
    }
}
Title: Re: Help for File Creation & Modification Date Issue...
Post by: Rick 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