1.

Solve : for /F command?

Answer»

If I use following command :
for /F %i in ('DIR \\server\jur00\ /S /B /a:d') do setacl "%i"

I receive the security of all the folders but if there is a folder with a space
(LIKE \\server\jur00\my documents) the command works any more because
for /f stop after a first space
setacl \\server\jur00\my

how can I skip a space with the for command ?

any solution ?
Not SURE if this will fix this or not, but you can try ADDING " " instead of ' ' to the command like
for /F %i in ("dir \\server\jur00\ /S /B /a:d") do setacl "%i"

In my batches when ever I know I will hit a space in a tree or file name, I always bind the command with " " and usually DONT have any problems.

Dave



Discussion

No Comment Found