01-22-2012, 05:17 PM
(This post was last modified: 01-22-2012, 05:18 PM by AceInfinity.)
Yes UserProfile is a special variable, and everything is good, except for your STILL USING "Hackopz" as a directory which will probably never ever exist on another person's computer, and also, up until here:
%loca% holds the value of "%userprofile%\Documents\Hackopz\" does it not? so if it doesn't exist, it will go past that if statement and try to navigate using CD to that location that doesn't exist, which is wrong. %UserProfile%\Documents might not always exist either, which is also bad, and there's about a 99% chance that the user "Hackopz" will not exist on someone else's machine either, so that shouldn't even be used.
Code:
if exist %loca% goto intro
CD "%userprofile%\Documents\Hackopz\"
%loca% holds the value of "%userprofile%\Documents\Hackopz\" does it not? so if it doesn't exist, it will go past that if statement and try to navigate using CD to that location that doesn't exist, which is wrong. %UserProfile%\Documents might not always exist either, which is also bad, and there's about a 99% chance that the user "Hackopz" will not exist on someone else's machine either, so that shouldn't even be used.