Spaces in SFTP Folder Location

Discuss RoboTask here

Spaces in SFTP Folder Location

Postby paraffin » Wed Mar 13, 2019 5:18 pm

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: 13
Joined: Thu Jul 19, 2018 8:31 pm

Re: Spaces in SFTP Folder Location

Postby paraffin » Wed Mar 13, 2019 7:05 pm

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.
paraffin
 
Posts: 13
Joined: Thu Jul 19, 2018 8:31 pm

Re: Spaces in SFTP Folder Location

Postby Oleg » Thu Mar 14, 2019 8:26 am

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
Oleg
Site Admin
 
Posts: 2406
Joined: Thu Jan 01, 1970 1:00 am

Re: Spaces in SFTP Folder Location

Postby paraffin » Thu Mar 14, 2019 10:50 am

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
paraffin
 
Posts: 13
Joined: Thu Jul 19, 2018 8:31 pm

Re: Spaces in SFTP Folder Location

Postby Oleg » Thu Mar 14, 2019 1:22 pm

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
Oleg
Site Admin
 
Posts: 2406
Joined: Thu Jan 01, 1970 1:00 am

Re: Spaces in SFTP Folder Location

Postby paraffin » Thu Mar 14, 2019 1:56 pm

Thanks Oleg

It could just be that the help is updated as it doesn't mention how to manage special characters
paraffin
 
Posts: 13
Joined: Thu Jul 19, 2018 8:31 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 10 guests

cron