-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SFTP upload issue when folder name has a space #23
Comments
Here's one of the outputs (sanitized):
|
Are you saying the Send-SFTPFile is unable to support filename with spaces and when it sees one it puts it in wrong folder or are you talking about my example which just shows some functionality, but not really tested for such scenario. |
I'm saying I think the issue is directory names with spaces, but it could also be I am not using your module correctly. Hence why I was using your example. I could be wrong on both things, as I was wrong on other issues I asked you about. :) |
Good morning/afternoon! Looking back over the example, its logic looks like it should be doing exactly what I want. But there's an error somewhere. Ideally, I just need to upload files from a local drive to an SFTP, skipping any existing files, creating new directories if they don't already exist, and writing any new files. Your example looks to be doing just that, but something is off somewhere. |
I need to do a deeper dive an maybe write something custom. I don't think this fully works to transfer folder with all its files to server the same way it's implemented in FTP. Just playing with Split and [-1] is probably bad idea and a reason it doesn't work reliably. |
I appreciate you taking a look. The automation PC I'm setting this up on has WinSCP installed, so I might could get that going as a workaround, but honestly I'd rather use your module. :) |
Implementing this #24 would probably help, but you could try to use this method directly. |
I'm using your SFTP uploading example here: https://github.com/EvotecIT/Transferetto/blob/master/Examples/Example07-UploadSFTP.ps1 and it works GREAT except when a folder to be uploaded has a space in the folder name.
Example: /uploads/folder/sub folder/* is placed at the root uploads folder, rather than under /uploads/folder/*
(I hope this made sense)
This is the script I used:
The text was updated successfully, but these errors were encountered: