How to invoke DOS commands from a ftp script? I have a requirement to know the status of the transfer of a file after invoking the FTP script from a command file. If I need to do this through SFTP (scp script), I would use SHELL command of DOS to invoke some kind of command for my checking purpose. But usage of SHELL does not seem to be permitted in FTP script. What else can be done to get back the return code of the file transmission.