473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Batch coding HELP!!!

2
Dear Bytes Community,

First of all I would like to thank you in advance for helping me.

I have been trying to write a batch code that will:

1. Auto execute after POST.
2. Increment a value that is suppose to represent number of the POSTs.
3. Save, display the value and restart the PC.

I have tried to write one that access a txt file for the value; however the value does not increment.



Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. @echo off
  4.  
  5. echo.This script is counting the # of POSTs.
  6.  
  7. cd "C:\Users\HP-M6\Documents"
  8. for /f "tokens=* delims=" %%x in (TEST.txt)  do echo %%x
  9.  
  10. call:myPOSTTest
  11.  
  12. for /f "tokens=* delims=" %%x in (TEST.txt)  do echo %%x
  13.  
  14.  
  15. echo.&pause&goto:eof
  16.  
  17.  
  18. ::--------------------------------------------------------
  19. ::-- Function section starts below here
  20. ::--------------------------------------------------------
  21. -- 
  22. :myPOSTTest    - here starts my function identified by it's label
  23.  
  24.  
  25. cd "C:\Users\HP-M6\Documents"
  26.  
  27. for /f "tokens=* delims=" %%x in (TEST.txt) do (
  28.  
  29. set %x%+=1
  30.  
  31. )
  32.  
  33.  
  34. goto:eof
  35.  
  36.  
  37.  

And I have a txt file that has X=0 for the value.



Thank you again for your help and I can't wait to get this over with.

T.J. Parsa
Jan 13 '14 #1
0 936

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: mx2k | last post by:
Hello @ all, we have written a small program (code below) for our own in-developement rpg system, which is getting values for 4 RPG-Characters and doing some calculations with it. now we're...
1
by: Stephen | last post by:
Was wondering if someone could please help me with an array I'd like to create in an asp.net page. I have to design an array which stores the values of addresses manually entered into textboxes...
12
by: kalinga1234 | last post by:
hy guys i am having a problem with my sudoku program which i coded using c++.; currently in my program if a duplicate number exist in either row/column/block i would make the particualr square...
0
by: riflefire | last post by:
Hello Everyone, I am using the new MITE c# text game engine to code up a MUD style game. I need a lot of help as i am new to C#. The reason i need the help is that the engine requires c# scripts to...
1
by: phill.luckhurst | last post by:
I've now got a form that will output to a MySql database as you can see here. http://www.windsurf.me.uk/form166/form.html Obviously the graphical look needs work. I am then using a...
2
by: kakaria | last post by:
hey guys, i dont know anything about coding in access. can u give me some guide lines, like how to open some form using a button in another forn, and how to create a form in which data can be...
2
by: jdrohen | last post by:
@ECHO OFF ECHO. ECHO **TEST** ECHO. ECHO Type the search string and press Enter then F6 then Enter. ECHO. FOR /F "tokens=1,2" %%A IN ('TYPE CON') DO SET INPUT=%%A DO SET INPUT2=%%B
1
by: Sm00th | last post by:
Hi all, I'm writing this batch script to start/stop some windows services using a combination of net start/stop and sc.exe. Now I need to do some verification on it, command 2 can only run when...
2
by: Sm00th | last post by:
Hi all, Need help again in batch scripting. I need to create a command line script to launch an .exe file, but this .exe launches a window instead of a command prompt, and in this window you have...
3
cori25
by: cori25 | last post by:
I am backing up a file in a batch file but when I run the batch it stops in the middle asking whether the path is a directory or a file? How can I declare that it is a file so that it will not stop...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.