Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have

  for /R "C:\path" %f in (_svn) do RMDIR /S /Q "%f" 

to remove the _svn folders from c:\path and this works if I paste it into the cmd window, but when run from a bat file it says f was not expected at this time.

Permissions? funk-a-tron? wassup?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

you have to use %%f in .cmd / .bat files to make that work, see here:

Use %variable to carry out 'for' from the command prompt.
Use %%variable to carry out the 'for' command within a batch file
share|improve this answer
    
duh thanks. glad it was that easy. –  Steve Aug 3 '11 at 4:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.