Find and delete folder

(imported comment written by pmullins91)

Vars within a batch file require two % signs. Running directly from the command line requires just one. So perhaps:

for /f "usebackq" %%a in (`dir /b /a "c:\documents and settings"`) do echo %%a
for /f "usebackq" %%a in (`dir /b /a "c:\documents and settings"`) do echo c:\documents and settings\%%a\desktop\sessions
for /f "usebackq" %%a in (`dir /b /a "c:\documents and settings"`) do rd /s /q "c:\documents and settings\%%a\desktop\sessions"

From c:>for /?

To use the FOR command in a batch program, specify %%variable instead
of %variable.  Variable names are case sensitive, so %i is different
from %I.

(imported comment written by brolly3391)

Troyboy,

pmullins has it right. the usage of the for command in a .bat file is slightly different than on a command line.

Deep details here: http://technet.microsoft.com/en-us/library/bb490909.aspx

in a nutshelll, just double up on the % character in front of the variable.

Cheers,

Brolly.

(imported comment written by troyboy91)

pmullins & brolly33

Thanks Guy’s …Works a treat…love your work…

Cheers

(imported comment written by pmullins91)

brolly33’s “work,” not mine :wink:

(imported comment written by sataylor91)

I’m testing this relevance with Fixlet Debugger (Alpha) Version 3.0.0.1 BES Version 7.5.0.933 and I’m getting the error “The expression could not be evaluated: class IllegalFileName”.

brolly33

I only answered 1/2 of your question. To check if that folder to be deleted exists in any profile on the machine you could use this relevance:
q: exists folder whose (name of it = “My Folder”) of folders of folders of folder "c:\documents and settings"
A: False
T: 362.695 ms
I: singular boolean

It’s not very fast because it is checking 3 folders deep.

Cheers,

Brolly

(imported comment written by labuski91)

sataylor

I’m testing this relevance with Fixlet Debugger (Alpha) Version 3.0.0.1 BES Version 7.5.0.933 and I’m getting the error “The expression could not be evaluated: class IllegalFileName”.

{quote:title=brolly33}I only answered 1/2 of your question. To check if that folder to be deleted exists in any profile on the machine you could use this relevance:
q: exists folder whose (name of it = “My Folder”) of folders of folders of folder "c:\documents and settings"
A: False
T: 362.695 ms
I: singular boolean

It’s not very fast because it is checking 3 folders deep.

Cheers,

Brolly

{quote}

its doing the same thing to me as well, i went ahead and tested in the old version of fixlet debugger 7.1.0.41 and it worked fine, so something is probably wrong with the newest version of fixlet debugger

(imported comment written by nagaraj.s)

hi

can we able to hide the program files in client computer

(imported comment written by nagaraj.s)

hi

this is very urgent please help someone to me

can we able to hide the program files in client computer

(imported comment written by jgstew)

Please start a new topic in the forum for this request.