mercredi 14 novembre 2018

Target folders with random names?

Windows 7 Windows 10 Batch

I have a set of folders that are created during a click-once install. However, the names of the folders change at every new install. Here is an example...

"C:\Program Files\Common Files\Application Data\Roaming\Data\40\[RANDOM]\[RANDOM]\and_here_are_the_actual_files_and_or_more_folders"

The goal is to be able to target said randomly-named folders and delete them. Unfortunately, it's not as simple as just deleting everything after the "40" folder. There are a mix of folders I need to target with folders that need to remain. To make it even more fun, within the aforementioned randomly-named folders, there are files that need to be deleted and files that need to remain. Yes, I can walk the folder structure and manually delete each and every file/folder that should be deleted, but I'm hoping for an automated fix so I don't have to drive around and physically touch more than 500 computers.

Is this even possible?

Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire