Computing.Net > Forums > General Hardware > Batch file first open

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch file first open

Reply to Message Icon

Name: kittybobjr
Date: October 17, 2009 at 13:11:04 Pacific
OS: Windows XP
Product: Microsoft Windows xp professional edition
Subcategory: General
Tags: Batch file, Menu
Comment:

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)



Sponsored Link
Ads by Google

Response Number 1
Name: anmor
Date: October 17, 2009 at 13:22:27 Pacific
Reply:

More detail would help, what sort of file? do you mean a different start point within the same file?


0

Response Number 2
Name: TechnoGeek
Date: October 17, 2009 at 15:16:04 Pacific
Reply:

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
:~firstrun
echo ~"this program has been run before" >> ~whatever.ext
--stuff to do first time--
goto end
:~secondrun
--stuff to do after first time
:end

if you're having trouble understanding it, just ask

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Batch file first open

attach a batch file with another file www.computing.net/answers/hardware/attach-a-batch-file-with-another-file/58470.html

Batch File For CD-ROM Drive www.computing.net/answers/hardware/batch-file-for-cdrom-drive-/55861.html

Making a Batch File www.computing.net/answers/hardware/making-a-batch-file/8085.html