Spaces in SFTP Folder Location

Discuss RoboTask here
Post Reply
paraffin
Posts: 21
Joined: Thu Jul 19, 2018 8:31 pm

Spaces in SFTP Folder Location

Post by paraffin »

Hi

I am working with an SFTP folder structure that has spaces which I cannot change.

I am using a variable that picks up this location on the SFTP File Loop that seems to accept the 'space' and moves onto downloading the file but I also want to delete the file on the SFTP server but the delete function interprets the space as the end of the folder string and fails.

I have tried using " and ' to encapsulate the SFTP Folder path but this stops it working altogether.

Any help appreciated
paraffin
Posts: 21
Joined: Thu Jul 19, 2018 8:31 pm

Re: Spaces in SFTP Folder Location

Post by paraffin »

I found the solution, on the SFTP Delete I had to encapsulate the Variable in " " to allow it to work which is different how the download works.
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Spaces in SFTP Folder Location

Post by Oleg »

What names do you mean?
with spaces in name like this: name with space.txt
Or does file (or folder) name have leading or trailing spaces?
Provide an example please.
Oleg Yershov
paraffin
Posts: 21
Joined: Thu Jul 19, 2018 8:31 pm

Re: Spaces in SFTP Folder Location

Post by paraffin »

HI Oleg

I have a task setup and with the following variables

SFTPFOLDER=/users/EI02 Export/UAT
FILESEARCH=*.*
FILETRANSFER=
LOCALFOLDER=E:\Data Import\File Import

The SFTP File Loop uses the first 2 to find files like this {SFTPFOLDER}/{FILESEARCH} it then puts the files in this local variable FILETRANSFER

In the SFTP Download, I use {FILETRANSFER} and {LOCALFOLDER} which works

In the SFTP Delete I need to use "{FILETRANSFER}" and this then works but as {FILETRANSFER} it doesn't handle the space in "/users/EI02 Export/UAT"

If you need more info then let me know
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Spaces in SFTP Folder Location

Post by Oleg »

Yes, of course you have to use quotes if the name contains spaces. Otherwise the command think that you use the list of files
BTW: You can use quotes always.

Maybe we need to make some improvements in order to avoid such problem. I wrote this into our ToDo
Oleg Yershov
paraffin
Posts: 21
Joined: Thu Jul 19, 2018 8:31 pm

Re: Spaces in SFTP Folder Location

Post by paraffin »

Thanks Oleg

It could just be that the help is updated as it doesn't mention how to manage special characters
Post Reply