The most recent (and best solution) is to overwrite the 3 parameters: and set filecopy_dest_filename = nul (with one l, not 2 ll).
UPDATE: 2020:
This solution seems to be easier than the previous:
Replace the three variables needed (filecopy_XXX, XXX XXX) and the dest_filename to nul (with one l, not two ll). And make sure the FeatureWriter is set to MOVE
You could use FileCopy and move the file to the null folder. \dev\null on Linux I think. There is a Windows equivalent, but I can't recall it off hand.
Hi @kam, the "os.rmdir(path)" method removes an empty folder; the "os.removedirs(path)" method removes a folder and its subfolders recursively if they all are empty; the "shutil.rmtree(path)" method removes a folder and all files and subfolders belonging to the specified folder. See the Python documentation to learn more.
@kam you could just use a system caller and an old fashion dos command for that