Topic "Error: 'winscp.com' is not recognized as an internal or external command"

Author Message
somdip007

Guest


I have WinSCP (version 5.9.1) installed on our Windows Server (Windows Server 2008 R2 Datacenter. Service Pack 1). The WinSCP is installed in C:\Program Files (x86)\WinSCP\ and WinSCP.exe and WinSCP.com sit in this same folder. The System Varibale Path also consist if this directory.

I am trying to automate the file upload (SFTP) using a batch (.bat) file. If I run the batch file using Task Scheduler then the following Error is thrown:
error>> 'winscp.com' is not recognized as an internal or external command,
error>> operable program or batch file.
error>> Access is denied.

But if I run the batch file manually by clicking on it then the file transfer is successful and without any issue.
I have also checked the System Environment variable for the whole system and the path of the WinSCP directory is included in that as well.

Where it might be going wrong in the automation?

Thank you in advance. Smile
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26138
Location: Prague, Czechia
Well, this is actually not WinSCP question at all.

If you put echo %PATH% before the winscp.com, what output do you get? (when executed in Task Scheduler)

Anyway, as an workaround, just use a full path to winscp.com, like:
"C:\Program Files (x86)\WinSCP\winscp.com" /script...
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License