473,662 Members | 2,752 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Batch coding HELP!!!

2 New Member
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 945

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

Similar topics

7
1518
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 trying hard to find out how to get it working with 'n' Characters, so you will be asked to enter a number at the beginning, asking you how many characters you want.
1
1816
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 (txtAdd,txtCity&txtPostcode). The array must hold the values of these three textboxes. I would like the array to also display these address values in an asp:Lable within a asp:TableCell inside a asp:Table. I want all this to happen on the...
12
6332
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. but thats not i want to do. I want to recurse back until until it find a correct number. i will post the function which i need the help; ---coding----------------------------------------------------------
0
1795
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 be written to run the mud. It also has a remote gui, code editor and other neat features. The mud i envision is a Science Fiction with a sub genre of being Christian Friendly. I know a rather different type of combination but very workable and what i...
1
1359
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 little php to read those to create this
2
1357
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 searched from tables by entering some value in one field, and how to create forms single form for searching and entering data. hope u ll help.
2
1303
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
1329
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 command 1 runs successfully. So let's say I issue sc start WinService01 If this service starts successfully it should run WinService02. If it doesn't run then goto WinService05 or something like that. I've played around with:
2
2942
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 to login and click some buttons before it actually do its stuff. How can I pass keystroke parameters just by using the command line? Here's what it's supposed to do: 1) Run winprogram.exe 2) Enter password 3) Tab 4) Enter 5) delay 5 seconds
3
1262
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 in the middle of executing? @echo off :: variables set drive=M:\Field Ops\DailyOurVoice_BackUps set backupcmd=xcopy /f /s %backupcmd% "C:\Database\Daily_Ourvoice\Data\181\Fri.xls" "%drive%\Fri(181).xls"
0
8435
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8768
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5655
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4181
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.