Page 1 of 1
Process only files in a directory - leaving directories
Posted: Fri Feb 08, 2013 5:57 pm
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)
Process only files in a directory - leaving directories
Posted: Mon Feb 11, 2013 10:51 am
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
Process only files in a directory - leaving directories
Posted: Mon Feb 11, 2013 6:56 pm
by wilsonj
Thank you - your reply helped me see where I had gone wrong, and enabled me to get it sorted out.
Process only files in a directory - leaving directories
Posted: Wed Mar 27, 2013 11:42 am
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?
Process only files in a directory - leaving directories
Posted: Wed Mar 27, 2013 12:42 pm
by freddyp
This functionality was added in Switch 10.
Freddy
Process only files in a directory - leaving directories
Posted: Mon Nov 04, 2013 11:35 pm
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.
Process only files in a directory - leaving directories
Posted: Tue Nov 05, 2013 9:26 am
by freddyp
This is now in a separate post.