Page 1 of 1

Append Date to File Name

Posted: Thu Dec 29, 2005 12:32 am
by Pipe-it
Hello,

Does anyone know if there is a way to append the date to the end of a filename - like "filename122805.txt" ?

Thanks & Happy New Year!

Posted: Wed Jan 04, 2006 8:17 am
by DataMystic Support
Yes, use a Restrict to Filename filter, and inside it, a Add Right Margin filter with the macro '@date'.

You may need to make the Add Right Margin filter a subfilter of a search/replace filter to get the date added in the correct spot.

Posted: Mon Jan 23, 2006 6:18 am
by Pipe-it
Simon Thanks!

This works great on one of our XP machines, but we recently bought another license for our Windows 2003 Server & using the @date macro results in:

"Error,Couldn't move file [D:\Jobs\quantex\all\TXP12C.tmp] to [D:\Jobs\quantex\all\3901949_1/22/2006.xls]:The system cannot find the path specified"

When we disable (un-enable) the "Add right margin @date" part of the filter, the rest of the filiter works fine.

Thanks

Posted: Mon Jan 23, 2006 11:31 am
by DataMystic Support
From the help:
Inserts the date with the system-defined short date format

Ie, go to control panel, and set your Regional settings-short date format to the same as the other machine.

We will change this in the next release to YYYYMMDD - you can use a subsequent search/replace pattern to pickup the date format and re-arrange it. You can use this workaround until we re-release it.