Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to automatically delete a specific file (a cache file) whenever I open the game World of Warcraft. How would I accomplish this? Is this something that be done with a shortcut? Do I have to write a *.bat file?

share|improve this question

2 Answers 2

up vote 11 down vote accepted

You may create shortcut, for batch file (.bat or .cmd does not matter)

for Example (RunGame.cmd)

del "FullPathToYourCacheFile"
start "" "FullPathToGameExecutable"

You may add specific game args after "FullPathToGameExecutable" if the game needs them.

share|improve this answer

Yes, this can be done. Even without a batch file.

Create a shortcut and supply the following command as location:

cmd /c del "PathToCacheFile" & start "" "PathToGameExecutable"

To avoid seeing a command prompt popping up, right-click the shortcut, select Properties change Run: Normal window to Run: Minimized.

share|improve this answer
    
While I like the idea of not making a batch file when I don't need to, I am currently using Steam to launch my game so I can't avoid the command prompt with shortcut properties. –  Koviko Jul 28 '12 at 20:55
    
I bet you could achieve that too, but it's probably not worth the effort. I wouldn't have posted a second answer, if you didn't specifically ask if it was possible without a batch file. –  Dennis Jul 28 '12 at 23:07
2  
Sorry. You did get my upvote though, so it wasn't in vain! :D –  Koviko Jul 28 '12 at 23:46
    
No worries. A batch file is the proper way to do this. I just didn't want to leave that part unanswered. –  Dennis Jul 29 '12 at 6:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.