# Renaming File With No Extension

**URL:** <https://community.cdata.com/t/renaming-file-with-no-extension/194>\
**Category:** CData Arc\
**Tags:** question, cdata-arc\
**Created:** [May 22, 2023, 3:23pm UTC](https://community.cdata.com/t/renaming-file-with-no-extension/194 "2023-05-22T15:23:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wnielson](https://avatars.discourse-cdn.com/v4/letter/w/dfb087/32.png) [@wnielson](https://community.cdata.com/u/wnielson)\
**Post date:** [May 22, 2023, 3:23pm UTC](https://community.cdata.com/t/renaming-file-with-no-extension/194/1 "2023-05-22T15:23:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![James\_B](https://sea3.discourse-cdn.com/cdata/user_avatar/community.cdata.com/james_b/32/1688_2.png) [@James\_B](https://community.cdata.com/u/James_B)\
**Post date:** [May 26, 2023, 4:34pm UTC](https://community.cdata.com/t/renaming-file-with-no-extension/194/2 "2023-05-26T16:34:19Z")

</div>

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.

```xml
<!-- 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
