Batch file first open

Microsoft Windows xp professional editio...
October 17, 2009 at 13:11:04
Specs: Windows XP
Hey, I would like to know if there is a batch file code, for the first time i open the file it goes to a certain area (area= :menu ) and then the second time i open the batch file it goes to a diffrent area (second area= :menu2)

See More: Batch file first open

Report •

October 17, 2009 at 13:22:27
More detail would help, what sort of file? do you mean a different start point within the same file?

Report •

October 17, 2009 at 15:16:04
i don't think there is a built-in command for this, however you
can do the following (replace ~whatever with your own text):
@echo off
if exists ~whatever.ext
goto ~secondrun
echo ~"this program has been run before" >> ~whatever.ext
--stuff to do first time--
goto end
--stuff to do after first time

if you're having trouble understanding it, just ask

(\__/) this is bunny
(='.'=) copy bunny into all your signatures
(")_(") to help him gain world domination!

Report •

Related Solutions

Ask Question