Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


viper8
2010-04-19T19:30:57Z
Hello everyone,

I have a file that comes in daily that has the format: filename_yyyymmdd.txt. What I need to do is rename only the file that matches today's date. For example: filename_20100419.txt . So I'm trying to use the {DATEFORMAT(yyyyMd)} variable, but that results in: 2010419. Notice that if the month is a single digit (like April), then it doesn't add the 0 in there. Now I could add the zero in the variable, but come October, the job would fail. Any ideas?

More I look at it, I noticed that with a Rename File task, there is no option to file based on filename...is there another way to do this?

Thanks!
Sponsor
Forum information
Support
2010-04-19T19:32:47Z
Try using two M's:

{DATEFORMAT(yyyyMMdd)}
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
viper8
2010-04-19T19:37:37Z
Support wrote:

Try using two M's:

{DATEFORMAT(yyyyMMdd)}



Ohhh that works! Thanks!

The more I look at it, I noticed that with a Rename File task, there is no option to filter based on filename using a variable...is there another way to do renames?

Basically what I'm looking to do is rename: filename_{DATEFORMAT(yyyyMMdd)} -> newfilename.txt
Support
2010-04-19T19:40:56Z
Which version are you running? You just specify that variable in the "Include file mask".
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
viper8
2010-04-19T19:46:55Z
Support wrote:

Which version are you running? You just specify that variable in the "Include file mask".



We're running 5.5.5. That did the job - Thank you!
Scroll to Top