Skip to main content

I have created a series of workbenches that populate an ESRI File Geodatabase. Each workbench corresponds to an individual feature dataset. I have created a workbench with Workspace Runners for each of the individual workbenches so I can run them from there instead of individually.

I have used a schemaScanner in the individual workbenches because the schema may change on the incoming datasets without my knowledge. 

For this reason I had set the first workbench run to overwrite the geodatabase instead of truncate to account for schema changes when doing geodatabase updates. However when I try to run it, I get an error that the geodatabase is locked. 

To get around this, at the beginning of the workbench I’d like to delete the existing geodatabase and then run each of the workbenches to recreate it. To do this I have read I should move the geodatabase to a temporary folder that FME will then delete at the end of the workbench run. 

I am have used the temp path creator to create an attribute for destination path and I have used the path reader to create a source dataset path but I have no idea how to format the File Copy transformer. I am having trouble inputting the destination path as choosing that attribute doesn’t seem to be an option? Open to other suggestions as well. 

I figured it out, I switched to the feature writer and was able to use my temp path attribute. 

Funnily, after spending a couple hours trying to get this to work I had a thought to add a FeatureHolder between my Workspace Runners and that has solved my locking issues so I no longer need to do this step. 


Glad to hear you sorted the locking issue and ultimately didn’t need your solution :)

I was going to point you in the direction of the FileExistenceChecker - https://hub.safe.com/publishers/safe-lab/transformers/fileexistencechecker

Once you know if the file/folder exists you can delete it


You can use the SystemCaller to delete the directory

create an attribute with the path of the File Geodatabase

create an attribute with the command for the SystemCaller

to remove the directory, the (old DOS) Command ist “rd”

this should help.

You can ceck first, if the Folder exists with the FileExistenceChecker.


Reply