[FileSystem] Rename File

[FileSystem] Rename File

  
Forge Component
(20)
Published on 26 Sep (4 weeks ago) by Guilherme Pereira
20 votes
Published on 26 Sep (4 weeks ago) by Guilherme Pereira

I have to rename files in a scheduler  

for eg.

serverpath/files/
abc.txt.error
zy.doc.error

So I have to rename those files output as a

serverpath/files/
abc.txt
zy.doc

How to achieve this one scenario?

Can't you use the Substring or Replace functionality? 

Martin Rozeboom wrote:

Can't you use the Substring or Replace functionality?

How To save file with the new name in current folder



Hi Bharat ,

You can write this logic :

1.Check file exits

if exist delete that file from folder .

2. Create new file with new name but old Content.

If this post solve your problem please mark it as solution .

Cheers,

Rocky