im using the batch script below and i keep getting the error “/ was unexpected at this time.”
any ideas?
thanks
@ Echo off
set n_user =%%%% username password;
c:\windows\system32\find / n "%% n_user" C:\Users\Voyager\Desktop\server installs\OpenVPN\config\list.txt> result.txt
for / f "skip = 1"%% a in (result.txt) do set n =%% a
if "% s%" == "----------" exit 1
exit 0
Remove the spaces between
/and the switch character in/ n(should be/n) and/ f(should be/f). (You have a couple of other space issues, too. I’ve fixed them as well. You also need to surround pathnames containing space characters in double-quotes.)