Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: FTP script not post to a folder

It should be:
"put ""D:\BOA\DSP\Files\Transform\Export\PIMCORE\PIM*"" ""PIMCORE/INPUT/"""

Or simply (as the paths do not contain any spaces):
"put D:\BOA\DSP\Files\Transform\Export\PIMCORE\PIM* PIMCORE/INPUT/"

See https://winscp.net/eng/docs/commandline#syntax
arodr72@...

FTP script not post to a folder

Hi,
I've just created a basic script to post some files from a folder to a specific folder in the FTP folder. The script works fine when I post it to the root. But every time I put a path understand this path as a command. I've added/removed quotations etc, but it is not reading the whole command ever.

This my first screen and I do not understand why this is not working as execute it in the console and the put works. The message I get is
Script: Unknown command 'PIMCORE/INPUT/'.

@echo off
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /log="C:\winscplog\WinSCP.log" /ini=nul ^
  /command ^
    "open sftp://syniti-sapcpi:yUgnzA0)@DP@!92@ftp-emea.aliaxis.com/ -hostkey=""ssh-rsa 2048 LEvLM3FyJJ/D20BvuaLQuF7qk8/Ps6g9tPJjTGEKie8=""" "put ""D:\BOA\DSP\Files\Transform\Export\PIMCORE\PIM*" "PIMCORE/INPUT/ ^ "EXIT"
 
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
)
 
exit /b %WINSCP_RESULT%

Thanks