sFTP File Loop issues

Discuss RoboTask here
Post Reply
boyemillar
Posts: 4
Joined: Mon May 11, 2015 4:53 pm

sFTP File Loop issues

Post by boyemillar »

I am having problems when trying to Synchronize or use an sFTP File Loop to download a list of file from an external suppliers sFTP site...

I have this working for another suppliers site... Do i need to request special permissions on the "Not Working" suppliers site.

The files don't seem to have any permissions on the "Not Working" site nor do they have any Group or Owner details. I can upload files and Download Single files and i can use PSFTP manually to login and run the "ls" command to read the directory fine.

Not Working Site...
Not_Working.jpg
Not_Working.jpg (76.58 KiB) Viewed 26773 times
Working Site...
Working.jpg
Working.jpg (70.11 KiB) Viewed 26773 times
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: sFTP File Loop issues

Post by Oleg »

I'm afraid that you can do nothing if permissions are equals to 0000

BTW: sFTP actions work through PSFTP utility.
Oleg Yershov
boyemillar
Posts: 4
Joined: Mon May 11, 2015 4:53 pm

Re: sFTP File Loop issues

Post by boyemillar »

Hi Oleg...

Strangely I can open the Directory and I can add files up onto the sFTP site or download individual files... I only have a problem if i try to Synchronize Local <= Remote or if i try to use the sFTP File Loop function.

But I can Synchronize or list the directory contents from the PSFTP command line fine.
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: sFTP File Loop issues

Post by Oleg »

If you have no permissions to read you can't synchronize folders
But I can Synchronize or list the directory contents from the PSFTP command line fine.
Could you please show me the command line and PSFTP scenario?
Oleg Yershov
boyemillar
Posts: 4
Joined: Mon May 11, 2015 4:53 pm

Re: sFTP File Loop issues

Post by boyemillar »

Hi Oleg,

We have been testing Robotask using the Trial License with several other Auto sFTP jobs and this is the first problem we have encountered. I just received my License code this morning so it's now fully Licensed.

These are the commands I have used in PSTFP manually...
PSFTP_Cmds.jpg
PSFTP_Cmds.jpg (366.79 KiB) Viewed 26758 times
Sorry I said Synchronizing... in my original post but that's not what I'm doing or what i need to do I just need to Move the files from the remote sFTP server to our Local Server.
boyemillar
Posts: 4
Joined: Mon May 11, 2015 4:53 pm

Re: sFTP File Loop issues

Post by boyemillar »

Hi Oleg,

Did you have any further ideas regarding my post...?
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: sFTP File Loop issues

Post by Oleg »

You can use the task below.
Of course you have to use your own connection parameters.

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1639840329
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task1204"
Hide=INTEGER|0
ID=INTEGER|1313650
LogOnAsUser=INTEGER|1
Name=STRING|"Test sFTP"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|2
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER

[Actions\Action1]
ActionID=STRING|"A_SFTP_LOGON"
Enabled=INTEGER|-1
Name=STRING|"SFTP Open (username@yourserver)"
Params=FOLDER

[Actions\Action1\Params]
host=STRING|"yourserver"
password=STRING|"8300183858849008361683093"
passwordmode=STRING|"0"
port=STRING|"22"
username=STRING|"username"

[Actions\Action2]
ActionID=STRING|"A_SFTP_CWD"
Enabled=INTEGER|-1
Name=STRING|"SFTP Change Folder (/Application_Export/ApplicationExport)"
Params=FOLDER

[Actions\Action2\Params]
folder=STRING|"/Application_Export/ApplicationExport"

[Actions\Action3]
ActionID=STRING|"A_SFTP_DIR"
Enabled=INTEGER|-1
Name=STRING|"SFTP File loop"
Params=FOLDER

[Actions\Action3\Params]
createmode=STRING|"1"
date1=STRING|"18991230"
date2=STRING|"18991230"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
filenameonly=STRING|"0"
folder=STRING|"*.txt"
kind=STRING|"0"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
sizesave=STRING|"0"
sort=STRING|"0"
sortby=STRING|"0"
sortorder=STRING|"0"
subfolders=STRING|"0"
timesave=STRING|"0"
varname=STRING|"FTPFILE"

[Actions\Action4]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER

[Actions\Action4\Params]
message=STRING|"{ftpFile}"
type=STRING|"3"

[Actions\Action5]
ActionID=STRING|"A_SFTP_GET"
Enabled=INTEGER|-1
Name=STRING|"SFTP Download ({ftpfile})"
Params=FOLDER

[Actions\Action5\Params]
file=STRING|"{ftpfile}"
folder=STRING|"f:\show\CandidatesFromSHOW"
ifexists=STRING|"0"
recursive=STRING|"0"

[Actions\Action6]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
Oleg Yershov
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: sFTP File Loop issues

Post by Oleg »

In addition:
Of course you can use sFTP Command action with command: mget *.txt

See example below:

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1639840329
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task1144"
Hide=INTEGER|0
ID=INTEGER|239738741
LogOnAsUser=INTEGER|1
Name=STRING|"Test sFTP 1"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|2
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER

[Actions\Action1]
ActionID=STRING|"A_SFTP_LOGON"
Enabled=INTEGER|-1
Name=STRING|"SFTP Open (username@yourserver)"
Params=FOLDER

[Actions\Action1\Params]
host=STRING|"yourserver"
password=STRING|"8300183858849008361683093"
passwordmode=STRING|"0"
port=STRING|"22"
username=STRING|"username"

[Actions\Action2]
ActionID=STRING|"A_SFTP_CWD"
Enabled=INTEGER|-1
Name=STRING|"SFTP Change Folder (/Application_Export/ApplicationExport)"
Params=FOLDER

[Actions\Action2\Params]
folder=STRING|"/Application_Export/ApplicationExport"

[Actions\Action3]
ActionID=STRING|"A_FOLDER_CHANGE"
Enabled=INTEGER|-1
Name=STRING|"Change Folder (f:\show\CandidatesFromSHOW)"
Params=FOLDER

[Actions\Action3\Params]
folder=STRING|"f:\show\CandidatesFromSHOW"

[Actions\Action4]
ActionID=STRING|"A_SFTP_COMMAND"
Enabled=INTEGER|-1
Name=STRING|"SFTP command (mget *.txt)"
Params=FOLDER

[Actions\Action4\Params]
command=STRING|"mget *.txt"
variable=STRING|"out"

[Actions\Action5]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{out}"""
Params=FOLDER

[Actions\Action5\Params]
icon=STRING|"1"
msg0=STRING|"{out}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
Oleg Yershov
Post Reply