Set Folder Date To Latest File Date?

I have a collection of files in folders that all have the same date after a restore.
The files have the proper date, just the folders are all the date of the restore.
What I need is for each folder to have the date of the latest file in the folder.
If I could get the folder to have the date from EXIF info, that would be great.
I use an app that processes the folders/files, and it relies on the folder date to determine if it should process them.
Currently, the app will process all files and folders, not what is needed.

Any DOpus gurus willing to give this a try?

I think you would have to use scripting to do this. There's nothing built-in to Opus which lets you set a folder's attributes based on the files inside of it (at least, not on their timestamps anyway).

How is the app using the folder & file times? It seems unusual to use folder times by themselves in that way since they can be bumped to the current time just by creating a new file in a folder, and that wouldn't usually imply that every other file in the folder had to be re-processed. (It might make sense to use the folder timestamp as an extra check, to avoid looking at the file timestamps, but before processing each file I'd expect most things to check the file timestamps.)

[quote="leo"]
How is the app using the folder & file times? It seems unusual to use folder times by themselves in that way since they can be bumped to the current time just by creating a new file in a folder, and that wouldn't usually imply that every other file in the folder had to be re-processed. (It might make sense to use the folder timestamp as an extra check, to avoid looking at the file timestamps, but before processing each file I'd expect most things to check the file timestamps.)[/quote]

Oh, I agree with you 100%. It's a stupid thing to use the folder date for processing. But it's the way it is and I can't change it.
Right now I have to open each folder and see what the date is, the use Set Attributes to change the date of the folder. Repeat 330 times.

I can see their idea though, if you have photos in the folder, there is no reason to add newer files. Except if you use any other tool to adjust anything inside the folder. I think it would be harder to read all files and determine if you need to process the folder from their point of view.

I also need this. Did you find a solution for this?

No, I have not.

Ok please help me here. I have several questions.

1- When you copy or move files, the timestamps of the folders change? I don't want the timestamps of the folders change. I have not seen any such options in DOpus. I see for files but not folders. Why don't we have the option for folders?

2- I was surprised to see that when I read a file inside a folder yesterday, the Modified timestamp of the the parent folder changed! Why? I didn't modify anything and all the files have their original modified timestamp, why the folder timestamp changes? How can I avoid this behavior?

In summary, when I create a folder and put files in it, I don't want its CREATED and MODIFIED timestamp change over time by reading or copy/move it.

So GHammer, even if we find the tool, it's no good. The dates change again later. First we have to find out how to keep the integrity of the created and modified timestamps of the folders.

[quote="Zodler"]Ok please help me here. I have several questions.

1- When you copy or move files, the timestamps of the folders change? I don't want the timestamps of the folders change. I have not seen any such options in DOpus. I see for files but not folders. Why don't we have the option for folders?

2- I was surprised to see that when I read a file inside a folder yesterday, the Modified timestamp of the the parent folder changed! Why? I didn't modify anything and all the files have their original modified timestamp, why the folder timestamp changes? How can I avoid this behavior?

In summary, when I create a folder and put files in it, I don't want its CREATED and MODIFIED timestamp change over time by reading or copy/move it.[/quote]

That's how Windows works. It's not Opus doing it; it's Windows.

This is exactly why, in general, it is not sensible for any tool to base its actions on the folder timestamps and it is futile to attempt to maintain the timestamps.

For my purposes, I use a tool to set the dates of the photos (RAW and JPG) to the date taken.
Then I change the date of the folder to the date taken.

Then I make certain I do nothing within the folders...

Ok, lets go one by one.

It's Windows yes, but for Copying and Moving, DOpus has an option to keep the timestamps for files. Why not for the folders? Or I'm missing it?

Opus does preserve the timestamps if it can. Or at least it did when this thread was written:

Can DO Preserve Modify and Create Dates of Folders When Copy

Note that updating and existing folder may differ from creating a new one (not sure) and some filesystems or permissions prevent it from happening. And anything changing the folder will mess things up, as mentioned.

You may also find this thread useful as it has a PowerShell script which I think does what you want:

Change folder modified to date as same to the files inside

Thanks I just checked that and the script was extremely useful.

One interesting thing that I discovered is the File Collections. I have discovered that if you add a folder to a Collection and later the date of that folder changes, the date in the collection doesn't change! That's kind of interesting and more to explore to see if it's useful.

I've seen this replay sooooo many times, in general IT environment, but certainly both systems administration and development environments in particular... People feeling forced to spend time devising a hackish way of accommodating a "process" that has "always been in place"... in some cases, without anyone left in an organization that actually knows "why". In some of those cases it can be downright dangerous to just change something unless you know all of the related things you should keep an eye on for breakage - and that more than anything seems to breed the FUD responsible for deciding to never change process, etc...

Anyhow... I'm pontificating here... I was curious "how difficult" it might actually be to get your process changed. Ideally, that 'other' batch process should really just look at the files... whereas now - you're trying to devise some other batch pre-process that will go in and look at the files anyway, then re-set the folder timestamp. Here's one reason that could suck... as the number of files grows, your pre-process can take some time to complete. You'll presumably schedule that to run at some point before the 'other' batch process that looks at the folders... Say there's some time left in between when your newly devised folder-timestamp-reset script completes and the 'other' batch process starts... and someone changes something in between that time? Is it important to guard against that / do you care? If so, then you'll want the time between runs to be linked or otherwise 'monitored' for minimal time between runs... yuck.

It would be difficult to change the way the other app works.
It is an image processor. It would seem easier to use D.O. or other program to check dates on demand than to have this app check each time it runs. I have 1000s of images it works with in 100s of folders.
But, as I said, I have a manual workaround.