Expand my Community achievements bar.

SOLVED

How to move a file on SFTP from one folder to another via technical workflow?

Avatar

Level 2

HI All,

 

i am trying to move the file in SFTP from one folder to another folder i have used execCommand('mv sftp....com/input/Filename sftp....com/Archive'); but still i am getting error  (err=2, the system cannot find the file specified.).here i have used this code in File Transfer, File collector and JS

 

rudraPraveenKumar_0-1690292283566.png

Thank You

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @rudraPraveenKumar ,

 

Please try using File Transfer activity and select the action as "File download" and select the External account of the Marketing server and give the Path of the File and File name to be downloaded.

 

In you scenario, mostly the Directory Path is incorrect...Please give the right Path.

 

Also, you can remove the file with the below Option after processing

 

Advanced Parameters--> Delete the source files after transfer

 

LakshmiPravallika_0-1690556835957.png

 

 

Even the mv command will work, if right paths are given.

 

Regards,

Pravallika.

View solution in original post

3 Replies

Avatar

Level 3

Hi Rudra,

Can you please help me with below points?

1. Is this SFTP configured as an External Account and you are trying to move file from one location to another in SFTP folder?

--If it is external account, you can simply use File Transfer Activity--> Download File--> And select Upload file in another File Transfer Activity and run the workflow

Note: The folder needs to be available for this to work (As per my understanding).

 

2. If it is not an external account and you are trying to move file from one folder to another in Marketing server. Can you show the logic?

 

Thanks,

Krishna

 

Hi @krishnakanth_patnaik_cc ,

1. Is this SFTP configured as an External Account and you are trying to move file from one location to another in SFTP folder? ...... Yes, it an external account 

--If it is external account, you can simply use File Transfer Activity--> Download File--> And select Upload file in another File Transfer Activity and run the workflow.... i tried but in this case file copying from one folder to another, not moving, i dont want to be there in both folders

 

Avatar

Correct answer by
Community Advisor

Hi @rudraPraveenKumar ,

 

Please try using File Transfer activity and select the action as "File download" and select the External account of the Marketing server and give the Path of the File and File name to be downloaded.

 

In you scenario, mostly the Directory Path is incorrect...Please give the right Path.

 

Also, you can remove the file with the below Option after processing

 

Advanced Parameters--> Delete the source files after transfer

 

LakshmiPravallika_0-1690556835957.png

 

 

Even the mv command will work, if right paths are given.

 

Regards,

Pravallika.