shell executor results in invalid command

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

Tutgirl gravatar image

updated 2019-01-05 04:58:49 -0600

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<="" p="">

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 -0600 )edit