I am Trying to find a way to look for a folder called "_data" and delete that subfolder only, inside another folder. It seems Switch only wants to look for file names....is there a script or something I can do this with and can you show me how to set up the flow?
I tried the trash can thing and could only get it to do the entire folder with contents....not what I want.
Sorting Folders and Sub folders by name for deletion
Sorting Folders and Sub folders by name for deletion
Hi,
there are several ways to achieve this, feel free to choose whatever fits your installation best:
1) You can build a flow that will break a job folder in sub folders, next handle these sub folders as job folders to sort them by name. The ones named "_data" can be removed using the Recycle Bin tool, the others could be re-assembled again so you end up with the same job folder as original, where the "_data" folder is removed. Depending on how similar your original job folders are, this can be achieved using Switch Core without additional modules.
2) You can write a script that will check if a job is a folder or a single file, if it's a folder, get a list of the contents (so you can check if a "_data" folder is present) and next delete that folder. In order to do this you'll need the Scripting module and some knowledge on scripting. Switch supports JavaScript, VB scripting and Apple script. You can find a full list of available functions in the Switch documentation.
Hope this helps you setting up your flow or creating your script. If you'd need a hand, I would recommend contacting your Switch reseller to get an overview of the available levels of help.
Kind regards,
Carine
there are several ways to achieve this, feel free to choose whatever fits your installation best:
1) You can build a flow that will break a job folder in sub folders, next handle these sub folders as job folders to sort them by name. The ones named "_data" can be removed using the Recycle Bin tool, the others could be re-assembled again so you end up with the same job folder as original, where the "_data" folder is removed. Depending on how similar your original job folders are, this can be achieved using Switch Core without additional modules.
2) You can write a script that will check if a job is a folder or a single file, if it's a folder, get a list of the contents (so you can check if a "_data" folder is present) and next delete that folder. In order to do this you'll need the Scripting module and some knowledge on scripting. Switch supports JavaScript, VB scripting and Apple script. You can find a full list of available functions in the Switch documentation.
Hope this helps you setting up your flow or creating your script. If you'd need a hand, I would recommend contacting your Switch reseller to get an overview of the available levels of help.
Kind regards,
Carine
Sorting Folders and Sub folders by name for deletion
I was able to delete the data folder and bring all of the folders back together. My problem is that I lost the original folder name and cannot get it to recognize it and put all the subfolders back in to that folder name...it has to be variable depending on the original job folder drop.
Sorting Folders and Sub folders by name for deletion
If you have used the Job Dismantler/Assemble Job method you can retain the original folder name with Attach Hierarchy info-->Add Job folder Name to Yes.
Then when you Assemble back your job you can choose as folder name the variable Job-->Hierarchy-->(Choose you index).
The same method can be used if you use Set Hierarchy-->Archive Hierarchy method to get back your folder together. Don't forget to put a higher number than "1" in Subfolder levels of Archive Hierarchy if you don't want your job the be flattened.
The important thing is to keep your folder name in the Hierarchy info.
Then when you Assemble back your job you can choose as folder name the variable Job-->Hierarchy-->(Choose you index).
The same method can be used if you use Set Hierarchy-->Archive Hierarchy method to get back your folder together. Don't forget to put a higher number than "1" in Subfolder levels of Archive Hierarchy if you don't want your job the be flattened.
The important thing is to keep your folder name in the Hierarchy info.