Hello Team,
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
View originalHello Team,
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
View originalHi @nshetty
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).
Hi @nshetty,
Or just good old DOS command with the SystemCaller?
I have a few of those in places :). With FME now being available on multiple OS, python is probably the better way to go for compatibility reasons.
Hi @nshetty,
Or just good old DOS command with the SystemCaller?
Dos command worked for me, But again in confusion with jdh comments.
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.
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.