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


Badge +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

Userlevel 6
Badge +22
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.
Badge +3

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. 

Badge +3

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

 

Reply