LN command giving an error

Advertisement

ajmiester
Joined:
Posts:
4
Location:
New York

LN command giving an error

Hi

The symbolic link command "ln" does not work for me. The command I am runnning is ln /home/dev/temp.txt /home/prod/temp.txt and I keep getting cannot create link error. Could someone please assist.

Regards
ajmiester

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: LN command giving an error

Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

ajmiester
Joined:
Posts:
4
Location:
New York

Re: LN command giving an error

here is my script
ftp_script.bat
--------------------------------------------------------------------------------------------------------------------------------------------------------
setlocal
set progdir="C:\Program Files (x86)\WinSCP\"
set ftpout=c:\temp\ftp_Script.txt
set logfile= c:\temp\ftp_Scriptlog
set ftpserv=ftp.xyz.com

echo option batch on >%ftpout%
echo option confirm off >>%ftpout%
echo open ftp://test:test@%ftpserv%:2023/ >>%ftpout%
echo ln abc/temp.txt xyz/temp.txt >>%ftpout%
echo close >>%ftpout%
echo exit >>%ftpout%

%progdir%winscp.exe /console /script=C:\temp\globalscape\%ftpout% /log=C:\temp\globalscape\%logfile%
goto :END

:END
endlocal
--------------------------------------------------------------------------------------------------------------------------------------------------------

Logs
. 2015-11-02 13:27:13.788 Using FTP protocol.
. 2015-11-02 13:27:13.788 Doing startup conversation with host.
> 2015-11-02 13:27:13.788 PWD
< 2015-11-02 13:27:13.835 257 "/" is current folder.
. 2015-11-02 13:27:13.835 Getting current directory name.
. 2015-11-02 13:27:13.835 Startup conversation with host finished.
< 2015-11-02 13:27:13.835 Script: Active session: [1] test@ftp.xyz.com
> 2015-11-02 13:27:13.836 Script: ln abc/temp.txt xyz/temp.txt
. 2015-11-02 13:27:13.836 Creating link "abc/temp.txt" to "xyz/temp.txt" (symbolic: Yes).
> 2015-11-02 13:27:13.836 SITE SYMLINK abcl/temp.txt samples/temp.txt
< 2015-11-02 13:27:13.883 501 Command not understood.
. 2015-11-02 13:27:13.883 Asking user:
. 2015-11-02 13:27:13.883 Cannot create link 'samples/temp.txt'. ("Command not understood.")
< 2015-11-02 13:27:13.883 Script: Cannot create link 'samples/temp.txt'.
< 2015-11-02 13:27:13.883 Script: Command not understood.
. 2015-11-02 13:27:13.883 Script: Failed
> 2015-11-02 13:27:13.883 Script: close
. 2015-11-02 13:27:13.883 Disconnected from server

Thank you

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: LN command giving an error

Your server does not support creating symlinks (SITE SYMLINK command):

ajmiester wrote:

. 2015-11-02 13:27:13.836 Creating link "abc/temp.txt" to "xyz/temp.txt" (symbolic: Yes).
> 2015-11-02 13:27:13.836 SITE SYMLINK abcl/temp.txt samples/temp.txt
< 2015-11-02 13:27:13.883 501 Command not understood.

Reply with quote

ajmiester
Joined:
Posts:
4
Location:
New York

Re: LN command giving an error

martin wrote:

Your server does not support creating symlinks (SITE SYMLINK command):

ajmiester wrote:

. 2015-11-02 13:27:13.836 Creating link "abc/temp.txt" to "xyz/temp.txt" (symbolic: Yes).
> 2015-11-02 13:27:13.836 SITE SYMLINK abcl/temp.txt samples/temp.txt
< 2015-11-02 13:27:13.883 501 Command not understood.



Thank you but the Help command in WinSCP does display LN as an option to run.

Thx

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: LN command giving an error

ajmiester wrote:

Thank you but the Help command in WinSCP does display LN as an option to run.
I wrote that your server does not support it. WinSCP does.

Reply with quote

ajmiester
Joined:
Posts:
4
Location:
New York

Re: LN command giving an error

martin wrote:

ajmiester wrote:

Thank you but the Help command in WinSCP does display LN as an option to run.
I wrote that your server does not support it. WinSCP does.

Thank you

Reply with quote

Advertisement

You can post new topics in this forum