Hi Shivam,
I think Python script is a quick way. For example:
-----
import fmeobjects, os
def processFeature(feature):
dir = feature.getAttribute('directory')
if not os.path.exists(dir):
os.makedirs(dir)
-----
Takashi
Hi,
Thank you Takashi for the reply. I did check your method for my question, but could not go through, I am a little low in coding actually.
I have got a method for the same.
We can use the "Creator" transformer and use "file copy" as the writer. A very simple workbench is displayed below. :)
.
Indeed that works :)
If you need to create many folders, create a workspace like this:
Then, you can run it repeatedly via another workspace having a WorkspaceRunner.
It seems that workspacerunner can do my job, as I need to run bulk workspaces in one go.
But, I am getting trouble using this. What i/p and o/p should I give to use this transformer?
Thanks
Solution depends on how you have folder paths information.
Just one example, if you have a text file containing folder paths line by line:
-----
01_Source\\Directory\\File
06_Erdas\\POI_Image
.....
-----
you can read the file with the Text File reader, and send every feature to the WorkspaceRunner (pass "text_line_data" to Destination File Copy Directory parameter).
correction.
-----
D:\\01_Source\\Directory\\File
D:\\06_Erdas\\POI_Image
.....
-----