I need to be able to change a filename of an outbound file to the following naming convention MOT599XXXX.CCYYMMDDHHMMSSNN using the current date and not adding a file extension. Any pointers on getting this done?
Solved
Renaming File With No Extension
Best answer by James B
You would want to rename the file before it is passed to whatever connector is being used for transport here, which you can do through a simple Script connector.
<!-- reference original file contents -->
<arc:set attr="output.filepath" value="[filepath]" />
<!-- overwrite filename -->
<arc:set attr="output.filename" value="MOT599XXXX.[now('yyyyMMddHHmmssff')]" />
<!-- pass out file -->
<arc:push item="output" />
A few notes:
- I’m assuming NN is fractions of a second. In Windows, this time format is ff - in Java it is SS
- HH returns the hour in 24 hour format - hh is 12 hour
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

