if statement for filenames

Advertisement

xyz789
Joined:
Posts:
1

if statement for filenames

I am currently pulling files from an ftp to use in an ssis package. At the moment I am using a wildcard to find the file as I know it will have a specific word in it. Unfortunately the company I am pulling these from also puts up test files with the same word in them and I am pulling test data. Is there a way to use an if like statement in order to determine if the word 'test' is in the filename and if so not download this file?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: if statement for filenames

For complex solution, you would need to use XML logging:
https://winscp.net/eng/docs/guide_interpreting_xml_log

Simple solution would be to move all the files with the specific word to a different temporary remote folder, move the test files back, and download all remaining files in the temporary folder, moving them back to original folder if required.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum