Creation of Files in Separate folders

Hello,

I’m trying to move/create files from folder to another folder based on the fileName.

Example: If I have 1) Test_001.pdf
2) Test_001.xml
3)Test_002.pdf
4) Test_002.xml files in a folder. The expected result
Folder Test001: 1) Test_001.pdf
2) Test_001.xml
Folder Test002: 1) Test_002.pdf
2) Test_002.xml

Can anyone suggest how should I approach to resolve this?

Thanks

What protocol are you referring to? SFTP/S3/smb/etc…?

Hi Sasank ,
You can use below expression to create target path
_directoryPath+"/"+$Name.substring(0,$Name.length-4)+’/’+$Name this will help you to create target path.
where direcotrypath = sldb:///abc/org/test
eg:- Name :- test1_001.csv
then target path= sldb:///abc/org/test/test1_001/test1_001.csv

1 Like

I’m using SFTP Protocol