Knowledge Base

Enter search queries below or use the tag links to the right to browse the knowledge base by category (Show All Tags).


Unknown Error. [1] [1] when trying to run batch file with DOSCMD

If you are trying to launch a batch file from within a Robo-FTP script using the DOSCMD command you might get an error of Unknown Error. [1] [1] like this:

 DOSCMD "testbat.bat"
 CMD:        DOSCMD "testbat.bat"
 *Error: 1 returned by C:\Windows\system32\cmd.exe /c "testbat.bat"
 Unknown Error. [1] [1]

The most likely cause of this error is that the batch file is not somewhere that Windows can find it.

Windows will only be able to find and run your batch file if it is in one of the following locations:

  1. The current working directory, usually set in your script with the WORKINGDIR command.
  2. A directory that is in the Windows PATH environment variable.

If your batch file is not in one of those two locations, then you must specify a full path to the batch file like this:

 DOSCMD "C:\some\directory\testbat.bat"

Article last updated: 2021-11-05

Tags: Robo-FTP, DOSCMD