?
Solved

Need a simple batch file that creates a file then checks for it on each run

Posted on 2004-10-22
2
Medium Priority
?
166 Views
Last Modified: 2010-04-14
Need a simple batch file that checks for the file c:\running.txt.  If not there it creates it then continues.  If it finds the file, it exits.
0
Comment
Question by:murryc
2 Comments
 
LVL 11

Accepted Solution

by:
KaliKoder earned 200 total points
ID: 12385537
Here is one:

REM  Do things if flag file is not there, exit if its there
set OSJOBLOG=C:\running.txt
if exist %OSJOBLOG% goto :END
echo test_ok>>C:\running.txt
:END
echo Batch File Job Complere
0
 

Author Comment

by:murryc
ID: 12385941
perfect..thanks
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Cloud is selling like hotcakes in the town. Technology lovers and even businesses have joined the wagon to taste a piece of this delicious technology treat. But how many of us really know what cloud is?
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…
Suggested Courses
Course of the Month4 days, 23 hours left to enroll

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question