04-18-2024 11:07 AM
When an employee leaves, their personal folder and any subfolders and files they have created needs to be deleted. I know I can delete an empty directory, but how can i find/delete all the files and subfolders they've created?
04-18-2024 12:08 PM
I'm looking to see if I have a pipeline for this...(think I may have broken it up into several small ones by asset type.)
Short term path, in classic Manager, you can use Asset Search to see where they are working to get a list of projects to work with, you can have a pipeline to find and delete assets by project (searching for their ID using everything before the @ seems to work best for me).
Some things to keep in mind when if you want to build your own pipeline:
04-18-2024 04:05 PM
It's not snaplogic related files. This is part of an identity management system. When an employee leaves, all their personal files and folders need to be deleted off a windows server. This was done before with Powershell scripts, but now converting to Snaplogic pipelines.
04-18-2024 10:24 PM
The FileDelete snap can indeed be utilised to delete files or empty directories.
FYI - If the file is a symbolic link, only the symbolic link itself, not the final target of the link, will be deleted. Moreover, if the file is a directory, the FileDelete snap will delete it only when the directory is empty.
On some operating systems it may not be possible to remove a file/directory when it is open and in use by this Java virtual machine or other programs.
04-23-2024 02:19 AM
Hi @wpenfold,
You can develop a solution that lists all folders and files under a certain directory. At the end, simply use the File Delete snap.
Regards,
Bojan