shell executor results in invalid command

asked 2019-01-04 07:32:11 -0500

Tutgirl gravatar image

updated 2019-02-08 10:11:42 -0500

metadaddy gravatar image

Im trying to execute shell script to move a file to archive folder. I can acheive this from local machine command prompt by the following script. But Shell Executor always comes up with some logs and invalid commands. I also tried rename command, but no hope. Please help me to achieve this. Please find the logs below.

Script:

#!/bin/bash
HOST='**.**.**.***'
USER='***'
PASSWORD='****'
File_To_Archive=$sourcefile
Archive_Folder=$archivefile
file=$filename
echo "filename"
echo $file
ftp -inv $HOST <<EOF
user $USER $PASSWORD
get $File_To_Archive
cd EPS/STBL/Archive
put $File_To_Archive
bye
EOF
exit 0

Logs:

stdout: Connected to **.**.***.** (**.**.***.**).   
stdout: 220 Microsoft FTP Service
stderr: local: EPS/STBL/Archive: 
stdout: Remote system type is Windows_NT.   
stdout: ?Invalid command    
stdout: (remote-file) local: EPS/STBL/Archive remote: cd        
stdout: (local-file) (remote-file)  
stdout: 221 Goodbye.
edit retag flag offensive close merge delete

Comments

I hope there should be a way to move files in File server for SFTP/FTP source.

Tutgirl gravatar imageTutgirl ( 2019-01-05 04:59:41 -0500 )edit

How did you configure the Shell Executor?

metadaddy gravatar imagemetadaddy ( 2019-02-08 10:12:36 -0500 )edit