Batch file to Delete Cookies

G

Guest

I have a very simple batch file that looks like this
del /Q /F %USERPROFILE%\Cookies\*.tx
But when I run it I get the following error
The system cannot find the path specified
What am I doing wrong
 
M

Matthias Tacke

=?Utf-8?B?V2lsbGlhbQ==?= said:
I have a very simple batch file that looks like this:
del /Q /F %USERPROFILE%\Cookies\*.txt
But when I run it I get the following error:
The system cannot find the path specified.
What am I doing wrong?

if %userprofile% contains spaces del woon't find the path.
Enclose the path:
del /Q /F "%USERPROFILE%\Cookies\*.txt"

HTH
 
P

Paul R. Sadowski

William said:
I have a very simple batch file that looks like this:
del /Q /F %USERPROFILE%\Cookies\*.txt

You have to quote the path because USERPROFILE probably has space characters
in it.

del /Q /F "%USERPROFILE%\Cookies\*.txt"
 
A

Al Dunbar [MS-MVP]

William said:
I never would have thought of that. Thanks!

I beg to disagree. Hang around here a while and it will become second nature
to you!

/Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top