Link to home
Start Free TrialLog in
Avatar of RoelPotman
RoelPotman

asked on

How to enter a windows directory in a bat-file

I would like to clear my Internet directory with a command in a bat-file, like

echo y | del c:\Win\Temporary_Internet_Files\*.* /s
or
echo y | del c:\Win\Temporary Internet Files\*.* /s

but both doesn't work. I expect the problem is
the long directoryname (Temporary Internet Files)allowed under Windows, but forbidden under DOS (8 pos).

Is it possible to clear my directory without chancing the directory name?

Thans in advance, Roel
Avatar of Nancygirl
Nancygirl

You can do it from DOS.
ASKER CERTIFIED SOLUTION
Avatar of LeeTutor
LeeTutor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Best method is deltree

deltree -y c:\windows\tempor~1\.
or
deltree -y c:\win\tempor~1\.
if windows directory is named win as your example shows.

Don't forget the . at the end.  You can also use

deltree -y c:\windows\temp\.  to clear your temp directory.

Place these in your autoexec.bat and everytime you boot they will be deleted.
Avatar of RoelPotman

ASKER

Leetour and Rbass1, sorry for the delay.
I used from both, from Leetour the way he describes, from
Rbass1 the short directory name with the ~.

Deltree did not work: 'The name specified is not recognized as...', because I am not the owner I accepted and made a work arround with the del-command.

Is it possible to give you both points?
Roel
HOW TO SPLIT POINTS ON EXPERTS-EXCHANGE QUESTIONS
You can split points on questions, however you need the help of Community Support to do so. What you need to do is post a zero point question in the Community Support area by clicking on the link for Community Support near the top left of the Experts-Exchange web page, in the EE Community section.  In the question you need to reference this question number (the easiest way is just to copy and paste your question's url from your browser's address bar into the Community Support question), tell who you wish to split the points among, and what point values to assign, then Community Support staff will do the rest, normally by reducing the original point value of this question to allow you to post new questions for the other experts.
These questions would be titled points for whomever and paste the question's url in the comment block so the expert would know what it was about.

LeeTutor, I asked. Thanks for the advice.
Hi Roel,

I've refunded 25 points on the Q, enabling you to accept one expert for the Q and to post a 25 pts Q in the same topic area for the other expert.
(Please add a link to the original Q in the "Points for" Q)

modulo

Community Support Moderator
Experts Exchange
Moudulo, thanks.

But I do not understand you.
I see I can give one of the persons the 25 points. I did to LeeTutor.

The second is able to receive the points after
adding a link(?) to the original Question in the points for the Q when I edit the Q I do not see ' Points for'.

Please advise me to give the points to  Rbass1
You need to create a new "question", which you can give the title "Points for Rbass1".  Assign it 25 points. Within your first comment of your new question, just copy the link of THIS present question into it in order to point out to Rbass1 what question he is being awarded points for.  Then, when he gives a comment, accept it as answer, and that will award him the 25 points he got from splitting THIS question's award.
Hi Roel,

As LeeTutor states, you'll need to create in this topic area a new question.
Name it "Points for Rbass1" and assign the 25 points I did refund, thus you'll still spending the original 50 points on the Q.

modulo

Community Support Moderator
Experts Exchange
Thanks Leetutor and Mudulo it was quit simple, but I missed the clue. I did so I wait no for Rbass1.
Roel