Question

Clipper holds file handle

  • 16 February 2019
  • 1 reply
  • 1 view

Badge

Hello,

 

I have a custom transformer.

 

My flow is that it takes path to set of raster files. Then it clips some of those, merge together using raster mosaicer and save in different location. Then I want to delete file from source location and move on.

 

Problem is that using SystemCaller rmdir I get information that those files that were clipped cannot be deleted because they are being used by another process.

 

When I set a breakpoint just before SystemCaller, when files are already clipped and merged I couldn't delete those files in windows explorer as well. There was information that FME.EXE is using those files.

 

If I remove clipper transformer then I don't have that problem. So I assume that clipper somehow holds handle to those files.

Do you know a workaround for this problem?


1 reply

Userlevel 2
Badge +17

Some raster processing such as clipping may not finish until writing the resulting rasters with the writer. I think it's the reason why you failed to remove the source file in the workflow.

If you write the resulting rasters with the FeatureWriter, probably you can remove the source files with the SystemCaller after writing.

Reply