I have archived a .jxl using ZipArchiver, After zipping the required file can we delete input file from source location.
Thanks,
Nagendra
Best answer by itay
Hi @nshetty,
Or just good old DOS command with the SystemCaller?
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
After the ZipArchiver transformer, you can try using the File Copy writer and setting the destination dataset attribute to null as suggested here or using a Python script suggested in this Q&A post (see david_r's comment).
Dos command worked for me, But again in confusion with jdh comments.
@nag the SystemCaller runs a command line, so something like del c:\\a.txt will work fine on FME installed on windows. However on linux the command is rm (for remove instead of del for delete) so the workspace won't run as expected. I haven't the foggiest idea what a mac command would look like.
The python OS module is a portable way to access system functionality.
os.remove, os.rmdir and shutil.rmtree will all delete the specified file/dir/tree regardless of which OS the workspace is run on.
If everyone in your company uses windows it's irrelevant, if you have a mix of OS environments, it's something to be aware of.