Here is my batch file.
For /f %%a IN (‘R:\ /b *.mdb’) do call "C:\Program Files\Microsoft Office\Office14\msaccess.exe" %%a /compact
I am trying to run through the R drive and grab all the .mdb's and do compact from msaccess but when I run this through command prompt I get this error:
%%a was unexpected at this time
Any suggestions on how to get this For loop command to work properly.