Skip to main content
Nintex Community Menu Bar

Add sufix to output filename when using "Copy file to File Share" Action

  • May 4, 2020
  • 3 replies
  • 20 views

Forum|alt.badge.img+3

How to append text [-obsolete] to the end of file name (preserving file extension) before copying the file to file share without changing the document name in library? ** Item level action - cannot use collection operation **

7715i61916002A74F9EE5.png

3 replies

Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • May 4, 2020
HI,

As you dont want to change the name of the document in the library you would have to copy it with the new name then move it to the file share.
Name can be appended to using a regular expression action.

Forum|alt.badge.img+3
  • Author
  • May 5, 2020

Can you give me a hand with the expression to get the file extension?   I have the expression to remove the file extension, but I'm stuck on capturing and saving just the extension to a variable.  Basically, spliting filename and file extension > concatenate strings. 


Forum|alt.badge.img+3
  • Author
  • May 5, 2020

Got it.. 

Filename txt var = Regex remove file extension .[^.]+($|?)

File extension Col var = Regex extract (.[^.]+$) 

File extension txt var = For each in collection (even with single item)

NewFileName txt var = build string concatenate FileNameVar_obsoleteFileExtesionVar