Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

rupertbear

Solved

Thanks for the reply.
It would appear to be an issue with the PowerShell module as when I use the put command it works fine and when I manually transfer the files that also works fine.
martin

Re: PowerShell SFTP upload – preserving uppercase filename

You are using WinSCP PowerShell module. That's a 3rd party package. We do not maintain it.

Though, I cannot imagine that the module would convert the filename case on its own. Maybe it's a "feature" of your server. Did you test this in WinSCP GUI? Or with WinSCP .NET assembly?
rupertbear

PowerShell SFTP upload – preserving uppercase filename

Hi,
In PowerShell I am having issues with the Send-WinSCPItem not preserving the filename case of a file I'm uploading to a remote SFTP server. Not sure if it's my stupidity....?

So, if $localfile contains say D:\Test\MYFILE

when I run the following
Send-WinSCPItem -WinSCPSession $session -LocalPath $localfile -RemotePath $remotepath

When I check the remote server the filename has been changed to lowercase i.e. myfile instead of MYFILE.

Is there some session option to preserve the case of the file that I'm missing?