Reputation: 1346
How can I rename file in install4j?
I have a step to choose the file by user, and if user uploads the file with different name then x.txt i need to rename it back with some post action back to x.txt
I see that install4j has option to Move files and directories, but I see only the destination as a folder, not a file name.
I see only one way how to do it by creating "Run script" post action and write code in Java to actually rename the file.
Is any other standard options in Install4j to do it?
Upvotes: 1
Views: 424
Reputation: 48015
If the "Source files or directories" property of the "Move files and directories" action is set to a single file, the "Destination directory" property can be a file name as well and then the action will rename the file.
Upvotes: 2