Jump to content

deleting stuff in the application data folder


Recommended Posts

hey im tryin to delete shortcuts off of the quicklaunch through a batch file but for some odd reason windows cant get to it! ive tried atleast 3 or 4 different ways to get to it and it still doesnt work. these are the things ive tried:

del %homepath%\applic~1\Microsoft\Interne~1\QuickL~1\ad-wat~1.lnk

del %appdata%\Microsoft\Interne~1\QuickL~1\ad-wat~1.lnk

del %systemdrive%\profiles\bran\applic~1\micros~1\interne~1\quickl~1\adwatc~1.lnk

and a few others, even when i try to go to just %systemdrive%\profiles\bran\applic~1 it says it cant find the path, but yet %systemdrive%\profiles\bran\ and %appdata% work (well %appdata% works at the run box but not in a cmd prompt). whats wrong?

Link to comment
Share on other sites


I do not think you can mix variables with 8.3 format. If you cannot do it from a cmd prompt, then it will not work in a batch file. They use the same interpreter.

Use this:

Del "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\Ad-watch.lnk"

Link to comment
Share on other sites

good job, you solved the mystery :D i guess ill just have to rely on my system drive being c: :}

edit

i just realized something you CAN use vars with 8.3 above the lines with %appdata% i have these lines and they work perfectly!

del %systemdrive%\Profiles\AllUse~1\Desktop\nerost~1.lnk

i guess %appdata% and 8.3 dont play well together....

Link to comment
Share on other sites

If you put your original ones in quotes, they should work. %Appdata% expands to seveeral directories which have spaces in them. %systemdrive% does't, so you don't have the problem there. Don't bother using the 8.3 names. Just put the whole thing in quotes and Bob's your uncle!

Link to comment
Share on other sites

If you put your original ones in quotes, they should work. %Appdata% expands to seveeral directories which have spaces in them. %systemdrive% does't, so you don't have the problem there. Don't bother using the 8.3 names. Just put the whole thing in quotes and Bob's your uncle!

good thinkin! will try it out. and is bob really my uncle?i was wonderin who my uncle was.... thanks now i can sleep peacefully..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...