Process only files in a directory - leaving directories

Post Reply
User avatar
wilsonj
Newbie
Posts: 19
Joined: Mon Apr 04, 2011 9:55 pm

Process only files in a directory - leaving directories

Post by wilsonj »

This seems like it should be a simple thing to do, what with all of the hierarchy processing tools, but I can't seem to get it to work.



I want to pull only files from a directory, leaving subdirectories where they are - because the destination directory for these files is at this level.



The structure is sort of like this:



Drive/Input (directory where files would be pulled from)



Drive/Input/Output (directory where files will end up)
freddyp
Advanced member
Posts: 413
Joined: Thu Feb 09, 2012 3:53 pm

Process only files in a directory - leaving directories

Post by freddyp »

I assume the top level directory for the "Submit hierarchy" is Drive/Input.



If you do not want Switch to scan Drive/Input/Output, then you have to define "Adjusted by (rule 1)". Set it to exclude Drive/Input/Output. Side remark: I find it odd that the structure should be Drive/Input/Output, and not Drive/Output, but I guess you have your reasons.



You will also have to set the parameter "Subfolder levels" of "Submit hierarchy". The default value is 1. This means that Switch will look 1 level deep and submit everything at that level as a job, and that might very well be a directory. When you set that value high enough (37, 53, 99) Switch will only find files to submit.



An alternative is that you let Switch pick up directories, but that you use "Job dismantler" further in the flow (again there is a "Subfolder levels" parameter) to "flatten" everything, i.e. get rid of the directories and continue with just files.



Based on your description I also think you will want "Subfolder cleanup" to be set to "No".



Freddy
User avatar
wilsonj
Newbie
Posts: 19
Joined: Mon Apr 04, 2011 9:55 pm

Process only files in a directory - leaving directories

Post by wilsonj »

Thank you - your reply helped me see where I had gone wrong, and enabled me to get it sorted out.
MartinD
Newbie
Posts: 1
Joined: Wed Mar 27, 2013 11:38 am

Process only files in a directory - leaving directories

Post by MartinD »

freddyp wrote:



If you do not want Switch to scan Drive/Input/Output, then you have to define "Adjusted by (rule 1)". Set it to exclude Drive/Input/Output.



You will also have to set the parameter "Subfolder levels" of "Submit hierarchy". The default value is 1. This means that Switch will look 1 level deep and submit everything at that level as a job, and that might very well be a directory. When you set that value high enough (37, 53, 99) Switch will only find files to submit.



Based on your description I also think you will want "Subfolder cleanup" to be set to "No".



Freddy


I just stumbled on this subject, and i have been trying to do the exact same thing - make Switch ignore subfolders in certain inputs/folders.

However I have an older version - LightSwitch09 - and I cannot recognize the options you are describing above... Do you know if this is not possible in this version of Switch?
freddyp
Advanced member
Posts: 413
Joined: Thu Feb 09, 2012 3:53 pm

Process only files in a directory - leaving directories

Post by freddyp »

This functionality was added in Switch 10.



Freddy
neecerp
Newbie
Posts: 14
Joined: Tue Jun 05, 2012 9:21 pm

Process only files in a directory - leaving directories

Post by neecerp »

Do you happen to know a way to restrict Switch from putting that darn Unique identifier on every folder it scans to match? I have a flow that searches an entire folder, but wants to add that unique name even if the folder is not pulled according to the flow.
freddyp
Advanced member
Posts: 413
Joined: Thu Feb 09, 2012 3:53 pm

Process only files in a directory - leaving directories

Post by freddyp »

This is now in a separate post.
Post Reply