Remove a Folder In Switch

Post Reply
MJDS
Member
Posts: 29
Joined: Mon Feb 19, 2024 12:19 pm

Remove a Folder In Switch

Post by MJDS »

is there a way to Remove a named folder when this is processed through switch.
Example
3 subfolders
Folder 1 Removed
Folder 2 Not removed
Folder 3 Not removed
freddyp
Advanced member
Posts: 1207
Joined: Thu Feb 09, 2012 3:53 pm

Re: Remove a Folder In Switch

Post by freddyp »

Are these three subfolders in a job folder, or are they part of a hierarchy? Supposing they are in a job folder, are there always 3?
MJDS
Member
Posts: 29
Joined: Mon Feb 19, 2024 12:19 pm

Re: Remove a Folder In Switch

Post by MJDS »

Basically this folder structure gets dropped into switch, its the same structure every time.

All switch does is find and replace the 6 digit job number at the begining of the file name.

Was Wondering if Switch could delete the folders called supplied and despatch and leave the rest as is.
Attachments
Screenshot 2026-08-12 at 15.13.46.png
Screenshot 2026-08-12 at 15.13.46.png (226.61 KiB) Viewed 18966 times
freddyp
Advanced member
Posts: 1207
Joined: Thu Feb 09, 2012 3:53 pm

Re: Remove a Folder In Switch

Post by freddyp »

I see two possible approaches.

Use the app "Delete files". For this to work the naming conventions of the files should be so that you can reliably delete the files that are in the "supplied" and "despatch" folders. The app has an option to delete empty folders so these folders will be removed if they become empty.

Use the app "Filetypes Counter" to count the number of folders in the job folder. Then dismantle the job one level deep ("Job dismantler") so you have all the folders separately. Divert the folders named "supplied" or "despatch" to the recycle bin and the others are regrouped with "Assemble job - Scheme:Custom" where "Number of files" is a Switch.Calculation of the private data with the number of folders minus 2.

Both apps are part of https://www0.enfocus.com/en/appstore/pr ... older-apps

Let us know which one worked for you.
MJDS
Member
Posts: 29
Joined: Mon Feb 19, 2024 12:19 pm

Re: Remove a Folder In Switch

Post by MJDS »

Excellent thank you the 2nd suggestion worked for us
Post Reply