1

On my main Windows 10 machine, I take a lot of video game screenshots with Steam. Within Steam's screenshot folder (Steam\userdata\<user_id>\760\remote), it creates a new folder for every game, which itself contains a screenshots folder that then contains the screenshots you've taken.

I've once backed up these screenshots to Google Photos. In order to get the screenshots to upload with the correct date, I used exiftool to set the "Date Taken" property on all the image files that existed at the time.

I did not delete these files after uploading, as I still want Steam to recognise them.

Since then, I've taken more screenshots and want to upload these new ones without re-uploading the ones that have already been uploaded (Google will recognise them as duplicates, but it's still a waste of my bandwidth and time with 165 folders and tens of thousands of images).

The only difference I can think of between the new screenshots and the previously uploaded ones are that the new ones will be lacking the "Date Taken" property. I don't have the date I uploaded the last batch on hand, and while I could maybe get that from Google Photos, I'd rather not.

Is there any way to search a top-level folder recursively for files that are missing a specific property?

1 Answer 1

1

I was able to find a similar question that helped me figure out how to do it.

Get Attributes listed in the “Details” Tab with Powershell

The answer for that question links to a Microsoft Dev Blog in which the author links a script and explains how to use it in order to get properties from a recursive list of files.

List Music File Metadata in a CSV and Open in Excel with PowerShell

The exact steps I took were as follows:

  1. Downloaded the Get-FileMetaDataReturnObject.ps1 script from the TechNet Gallery.
  2. In a Powershell window with Admin Privileges, I gave my self permission to run unsigned scripts using the command Set-ExecutionPolicy Unrestricted.
  3. I loaded the script into memory using the command C:\Users\<username>\Desktop\Get-FileMetaDataReturnObject.ps1.
  4. I created an object that contained all of the metadata properties for every folder and file in the screenshots folder with the command $fileMeta = Get-FileMetaData -folder (gci "C:\Program Files (x86)\Steam\userdata\<user_id>\760\remote" -Recurse -Directory).FullName. This took three hours to complete on my machine.
  5. I then exported the specific properties I needed using the command $fileMeta | select Path, Kind, "Date taken" | Export-Csv -Path "C:\Users\<username>\Desktop\screenshots.csv" -Encoding ASCII -NoTypeInformation.
  6. In Notepad++, I marked all lines that contained the word thumbnails (to ignore the auto-generated thumbnails subfolder Steam created), Folder (to ignore folders in general) and ,"? (for some reason, it appears Powershell couldn't properly parse out the dates and appended a question mark to the beginning of each one, but this helped me easily filter out null values) and deleted them.
  7. I was then left with a list of files that needed to be backed up to Google Photos.

It would probably be easier to just retain the last upload date and use the Windows search command datecreated: d/m/yyyy .. d/m/yyyy (range between the last upload date and now, using Australian format), but either method requires a bit of jigging about to filter out stuff you don't need, like thumbnails, while retaining the organisation (i.e. what game each screenshot is from).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.