Post a reply

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)


Topic review


Re: Error: '' 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, what output do you get? (when executed in Task Scheduler)

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

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