cancel
Showing results for 
Search instead for 
Did you mean: 

File Rename but not able to replace

Pakhi
New Contributor III

Hi All,

I am facing one issue in one of the scenario. Please Help.

I have a source file name in source path Ex: a_b_abc_test_120_7568.xml
I want to rename this file in different format Ex: a_babctest_120_7568.xml
I have written one code in mapper and changed the format.but after changing the format i want to replace the original file with the renamed filename and delete the original one.

3 REPLIES 3

bojanvelevski
Valued Contributor

If the file is located on any of the following locations, you can easily achieve this by using File Operation:

local file (file:///), FTP, SFTP, S3, WASB, and WASBS

If we’re talking about a file that is on SLDB, than the following pipeline should do the job:

Rename & Delete old.slp (7.7 KB)

gowdhaman008
New Contributor II

@Pakhi,

Have you checked https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/187072700/File+Operation documentation.

File Operation supports “Rename” as well.

Pakhi
New Contributor III

Thanks @gowdhaman008 I did using file operation