JElster
asked on
DOS Batch file
How can I write a BAT file to navigate to
%localappdata%\mydata
and delete the contents
I want to place the file on my WIndows 7 desktop
%localappdata%\mydata
and delete the contents
I want to place the file on my WIndows 7 desktop
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@JElster - you've chosen 3 comments as your solution, all of them do not delete subfolders in your target folder. Which of the 3 are you working with now?
ASKER
none.. I gave up
In that case, we should delete this question. I can do that for you if you like (or ask for Attention).
The question has been marked as solved...so dropping it and moving on would also work? Just a thought.
cmd.exe /c "echo rmdir /s /q %APPDATA%\mydata" && pause
and give it some useful name.
Note that the above command now only echos what it would delete and halts with a pause, it also deletes the mydata folder.
Also note that the above suggestions that use the del command do not remove subdirectories of mydata.
Do you want the 'mydata' folder removed as well or not?