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

Advertisement

somdip007
Guest

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

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. :)

Reply with quote

Advertisement

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

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

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...

Reply with quote

Advertisement

You can post new topics in this forum