Community forum

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


Ujma
  •  Ujma
  • Paid support Topic Starter
2020-08-10T20:39:00Z
Hi there,

I am trying to rename multiple files in same folder, adding current date and removing special characters from filename.

but even if I have checked "Overwrite if existing" it still adding date every time when job run.

New File name Mask (this is what I am using) : {PATH(GetFileNameWithoutExtension|{LOOP(CurrentValueX)})}_{DATEFORMAT(yyyy_MM_dd)}{PATH(GetExtension|{TASK(Active|SourceFolder)}\{LOOP(CurrentValueX)})}

{REGEX(Replace|{NEWNAME()}|[- ()_ ,]+|_)} - this is what I am using in Post process mask.

I want to add date only once no matter how many time job run, can you please help me with this ?


Thank You,
Ujma





Sponsor
Forum information
Support
2020-08-11T15:29:29Z
Originally Posted by: Ujma 

Hi there,

I am trying to rename multiple files in same folder, adding current date and removing special characters from filename.

but even if I have checked "Overwrite if existing" it still adding date every time when job run.

New File name Mask (this is what I am using) : {PATH(GetFileNameWithoutExtension|{LOOP(CurrentValueX)})}_{DATEFORMAT(yyyy_MM_dd)}{PATH(GetExtension|{TASK(Active|SourceFolder)}\{LOOP(CurrentValueX)})}

{REGEX(Replace|{NEWNAME()}|[- ()_ ,]+|_)} - this is what I am using in Post process mask.

I want to add date only once no matter how many time job run, can you please help me with this ?


Thank You,
Ujma







You can either change the filter of the name so it doesn't pick up the processed files again, or (the most convenient solution) would be to create a new folder and have the processed files placed in that new folder - so it doesn't re-process them again

Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
Ujma
  •  Ujma
  • Paid support Topic Starter
2020-08-12T18:29:21Z
Thank You, I will try this out
Gary_W
2020-08-13T21:12:36Z
In your list files task, check the boxes for "use file exclusion" and "is regex" and use this following regex which will exclude files that already have the date right before the extension:

^.*?_\d{4}_\d{2}_\d{2}\..*$

This regex matches a string that ends in *_9999_99_99.* where:
* = anything
_9999_99_99 = 4 then 2 then 2 digits
\..*$ = a literal dot followed by anything until the end of the string
Scroll to Top