vikrant rana
vikrant rana

Reputation: 4674

Download files starting with specific prefix from SFTP server using Execute Process Task and WinSCP in SSIS

I am having couple of files present at WinSCP folder location USERDATA. Files present are staring with following names: ABC_XXXX.txt and XYZ_XXXX.txt.

I am interested in downloading all the files which are starting with ABC_ prefix only.

Below is my Execute Process Task configuration:

Executable- C:\Program Files (x86)\WinSCP\WinSCP.exe
/log=c:\path\to\log\winscp.log /command "open sftp://username:[email protected]/" "get /USERDATA/User_file.txt C:\User\Local\" "exit"

It's running fine when I am downloading a single file. How can we parametrize it to fetch the specific files which starts with prefix ABC_ only. Is there any way we can set the expression for this?

Upvotes: 2

Views: 1416

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202272

Use file mask ABC_*:

... "get /USERDATA/ABC_* C:\User\Local\" ...

Upvotes: 1

Related Questions