Corrupt Last File 0kb

Advertisement

PPATEL
Joined:
Posts:
6

Corrupt Last File 0kb

Hi,

I am on WINSCP 5.18.0 beta version, and I download files based on extension. So what happening is that I am not sure if extension matters on case sensitivity. I had these two statements in C# code:

transferResult = session.GetFilesToDirectory(
    Properties.Settings.Default.Sftp, Properties.Settings.Default.Proof,
    "*.PDF", false, transferOptions);
 
transferResult = session.GetFilesToDirectory(
    Properties.Settings.Default.Sftp, Properties.Settings.Default.Proof,
    "*.pdf", false, transferOptions);

If I have more than one .PDF file, the last PDF would be overwritten, and get corrupted with 0kb. Now, we don't really need the lower case pdf option, but it was just a safety net incase if vendor mistakenly upload a .pdf file.

So, with that said, Should I remove the lower case extension, and would the upper case extension be efficient to capture all forms of PDF extension?

Any Thoughts?

Reply with quote

Advertisement

Advertisement

You cannot post new topics in this forum