Hi guys,
I'm trying to create a bat or cmd file that can run all the sql scripts in a folder, which is very useful for my sprocs folder especially. If I run the following script from command line it works fine:
FOR %f IN (*.sql) DO OSQL -U username -P password -S localhost -d databasename -n -m-1 -b -i "%f"
But if I put it in a .bat or .cmd file then it blows up:
f" was unexpected at this time.
How do I fix this?
Thanks!
Justin