I reviewed the posts on the site regarding BAT files and handling & in them. I’m not able to resolve the issue. We’ve just started using passphrases (basically longer passwords) and they contain characters that previous problem free code barfs. But that’s what we are here for right?
This BAT file is called from a VBS and the VBS passes the passphrase.
In todays passphrase is just happened the 1st character in the passphrase is a &. So the below echo logs nothing. My assumption is that the BAT interpreter thinks the passphrase value is a variable.
So please set me straight on how to resolve this. As I said I tried several solutions provide on the site but didn’t help me out.
cd C:/MyFiles/kohlsreports
echo del ftp.txt
set TSOUSER=%USERNAME%
set PASSWORD=%1
echo %TSOUSER%
echo %PASSWORD%
.....other code
del %TSOUSER%.REPORT.DATE.txt
echo ftp
echo open JCA01>ftp.txt
echo %TSOUSER%>>ftp.txt
echo %PASSWORD%>>ftp.txt
.....other code
start ftpfiles.vbs
END
QUIT
Used other posts here for a code fix but nothing I tried fix my particular issue
Andy Andy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.