I'm using the batch script below:
FOR /F "TOKENS=1 DELIMS=" %%I in ('FTP -s:%FTPFIL% > log.txt') DO SET /A FTPNUM=%%I
and get an error:
> was unexpected at this time.
What is the cause of this error?
Put your entire command into doublequotes
('"FTP -s:%FTPFIL% > log.txt"')
Or escape the redirection with a caret
('FTP -s:%FTPFIL% ^> log.txt')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With