HOW to run a batch file in BACK 6.22?

I wrote a batch file that works fine in the Windows command prompt, but I would like to be able to run after POST in the BACK. I copied my code AUTOEXEC. BAT file that runs automatically; However sometimes with syntax errors when it reaches the call control and the rest.

echo. This script is counting the # of POSTs.
echo. The POST # value is saved in TEST.txt.
echo.

call:myPOSTTest

for /f "tokens=* delims=" %%x in (A:\TEST.txt)  do echo POST# %%x

echo. &pause&goto:eof
::--------------------------------------------------------
::-- Function section starts below here
::--------------------------------------------------------

:myPOSTTest    - here starts my function identified by its label 

set var=0

if EXIST A:\TEST.txt (
     for /f %%x in (A:\TEST.txt) do (set /a var=%%x+1)
)

echo %var% >> A:\TEST.txt

goto END

:END

Thank you

Hello

Many of us being volunteers do not have the expertise to help.  Refer the question to the TechNet Script Center.

Script Center

Tags: Windows

Similar Questions

  • How to code a batch file to put in the form of z: drive?

    I would like to drive Z: quick format and xcopy in D: drive in the Z: drive for backup.

    I would like to pass on any message entry also.

    Anyone have any suggestions on how to code a batch file for this?

    Thanks for all the suggestions

    Hi oem7110,

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is best suited for on TechNet. Please post your question in the TechNet forum. Link: http://social.technet.microsoft.com/Forums/en-US/ITCG/threads

    With regard to:

    Samhrutha G S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Should I have the administrator account to run the batch file?

    When I log in as administrator, I run after the file of commands without any problem, but

    When I login as a user, I can't run after the batch file, the changeover of the authority.

    I would like to know if I need to log in as an administrator to run this batch file or not,

    Can I use different accounts group? and always perform this task.

    Does anyone have any suggestions?
    Thanks in advance for your suggestions :>

    off @echo
    echo copy C: d:

    RoboCopy C:\ /MIR R:1 /W:1 D:\
    ECHO done

    Hello
     
    To respond to your request, you must enter the administrator password to access this command file.
    Instructions for Windows 7
    In order to run as administrator, create a shortcut to the batch file.
    1. right click on the batch file, then click on copy
    2. navigate to the location where you the shortcut
    3. right click on the background of the directory
    4. select Paste shortcut
     
    Then, you can set the shortcut to run as Administrator:
    1. right click on the shortcut
    2. Select Properties
    3. in the shortcut tab, click Advanced
    4. check the box "Run as Administrator"
    5. click on OK, OK
    Now when you double-click the shortcut it will ask for confirmation UAC and then run as an administrator (which as I said above is different than running under an account in the administrator group)
     
    I hope this helps.

  • I, stupid, changed the program by default to a BAT file to the cmd prompt, well, now I can't run the batch files now, please help!

    I, stupid, changed the program by default to a BAT file to the cmd prompt, well, now I can't run the batch files now, please help!

    Hi William,.

    Welcome to the Microsoft community.

    Batch file is a type of script file, a text file, containing a series of commands to be executed by the command prompt. When you run a batch file, it opens the command prompt to run the scripts.

    It would be great if you can answer the following questions:

    1. what happens when you try to run a batch file?

    2 are. what batch file you referring?

    3. the problem occurs for a particular batch file?

    First of all, I suggest you to check the commands written in a batch file. To do the same thing, just right-click on the batch file, and then click change. It will open Notepad with the list of orders scripted for this particular batch file.

    If you have additional questions on the computer, please ask your question about Windows and we will be happy to help you.

  • How can I get my files LR back up to my new computer

    How can I get my files LR back up to my new computer

    Have you been through these steps?

    How can I move Lightroom to a new computer? Lightroom Queen

  • How to have a batch file executed without the BACK popup on the screen?

    original title: running tape recorder in a minimized batch file or out of sight?

    Hi, I'm wanting to play a sound every 30 minutes.

    I wrote a batch file for use of Windows sound recorder to play the sound, and then close.  I will use the Task Scheduler to run and the calendar.  The sound seems to play fine, but every time it works I see a popup box BACK and then heard play recorder app.  These two things quickly disappear automatically, but ideally, I want the sound to play and can't see the window BACK or recorder popup of sounds on the screen.  Is there a way to minimize or hide these things automatically?  As it is run in the background, but still play the sound?  My batch file is below:

    Sndrec32.exe "C:\WINDOWS\Media\chimes.wav" /PLAY / CLOSE

    This could help you.
    http://zoombody.com/articles/run-a-batch-script-minimized

  • How to plan a batch file (* .bat) to run when I'm not present?

    Task Scheduler menu does not show me anything about it.

    I have a batch file that saves my directories and important files on an external drive. It has been debugged and works if I run everything in present.

    What I would do now, is that it is every night when I'm not at the computer, say at 23:00.

    How he handles a situation where it need an answer? for example, XCOPY sometimes ask you if you want to replace the files.
    Bill

    To program on Windows XP, you would use Panel initially scheduled tasks | All programs | Accessories | System Tools.

  • How to restart and stop the system by running a batch file?

    Can any body give the command batch file for restart and stop of the system.

    My requirement is to reboot or shut down the system at a specific time. So I think that by creating a batch file, that I can schedule the file to run at a specific time of the scheduled task...
    With regard to:
    Rahma.

    Hello

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited on MSDN. Please post your question in the MSDN forums. You can follow the link to your question:

  • How to create the batch file for configuring windowos?

    Like how to add running exe/service turn on DEP Windows batch file (.bat).
    My computer > etiquette > advance setting > setting > prevention of execution of data (DEP) > add > ok.

    Hello

    The question you posted would be better suited to the MSDN Community. Please visit the link below to find a community that will support what ask you

    http://social.msdn.Microsoft.com/forums/en-us/categories

  • How to kill the Batch files

    Hello

    I have three files batch for the aggregation.

    I used maxL in the batch file, and there are nearly 10 scripts of aggregation.

    Sometimes I have to kill the batch files... Can anyone please suggest how to kill the ball file while running.


    Thanks in advance.

    Depends on who do OS you run the script, you run the script and why you want to kill the script
    The script can be killed, but this does not mean that the current operation of essbase, you may need to use maxl /eas to try to kill the active session/query.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to code a batch file to force the reboot of the window?

    I used to run following code on batch file to restart the window, but if window is blocked, it does not.

    does anyone have any suggestions on any more powerful coding force restart the window if window is blocked?

    Thanks in advance for your suggestions

    %windir%\System32\shutdown.exe - r

    You can try adding the-f (force) option to your shutdown command:
    %windir%\System32\shutdown.exe - r f

    HTH,
    JW

  • Run a batch file in windows separated box to call DRM client batch

    I need your suggestions on what follows.

    ODI & DRM are installed on separate boxes.

    Now, I want to ODI to call a batch file (kept on DRM - Windows box, this batch file called client batch DRM for export metadata). I tried to use the notion of shared folder, but without success.

    Pointers please?

    This should work for you-

    Create a batch on your current server (ODI) file and write in the path to the other file of commands on the other server.

    Server2completename/D$/path/yourbatchfile.bat

    Calling your batch file that you created on the same machine... which inturn will call the other on another machine batch file to run the batch client from the ODI.

    Also you can paste errors that you can get... need to check if you get any specific problem related to this.

    Thank you

    Denzz

  • How to run a response file? SQL * more?

    I have red many around response files, but nowhere on the basic question: where and how the hell I am running a response file. (lol)

    Lets say I want to execute a response dbca file

    1 ok, I've put all the settings on HOME/inventory/response/dbca.rsp

    2. what command I have to run it year where? Is it on plu SQL?

    Thank you

    Obviously on the shell / command :) prompt

  • Run a batch file script

    Hi all

    I want to run a SQL script that is executed from a batch file.
    Lets say, I have the file loader.bat. This .bat file connects to Oracle and wants
    to run the .sql file

    The content of the file loader.bat is
    sqlplus 
    @C:\temp_val_id.sql
    At runtime, it calls in the name of user and password. I enter the user name and password and then log on to Oracle
    But the temp_val_id.sql file isn't exectuted.

    The output is as below, but .sql file does not run
    C:\>sqlplus
    
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 28 17:19:50 2012
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    Enter user-name: utest_tt_senayat/password@silver3
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL>
    I'm now trying another method
    sqlplus 
    @@C:\temp_val_id.sql
    The result is the same as above. Do not run temp_val_id.sql

    Could someone please help me,

    Thanks in advance
    Saaz

    Saaz Ena wrote:
    sqlplus/nolog @test.sql

    test.sql content:

    connect &user/&pass
    select sysdate from dual;
    exit;
    /
    
    C:\work\test>sqlplus /nolog @test
    
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 28 16:21:12 2012
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    Enter value for user: system
    Enter value for pass: manager
    Connected.
    
    SYSDATE
    ---------
    28-MAR-12
    
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
  • How to run the zipx files in Windows 8 without having Winzip

    Cannot run a zipx file in Windows 8.

    I found a Windows 8 Metro WinZip application.

    Thanks for responding.

Maybe you are looking for

  • Yahoo Search no longer works

    Since the installation of Version 39.0, yahoo search no longer works. It does not connect. I have reset / updated Firefox. Does not help anything. Other search engines work, but not "search.yahoo.com. It works in Internet Explorer but not in Firefox.

  • Avast wants me to remove infoatoms and change my browser settings

    So I close Firefox and my computer. When I restarted and back - open Firefox, it did not start as it should. I got the oops of screen instead. But I also had a popup of Avast (one of these screens which stays on top) tell the community Avast don't li

  • HP Pavilion dv6750en drivers

    Hello everyone I have a HP Pavilion dv6750en and I want to downgrade from vista to xp professional but I can't find the correct drivers, I watch http://h10025.www1.HP.com/ewfrf/wc/softwareList?OS=228 & LC = on & DLC = in & CC = US & lang = to & Produ

  • Satellite L750D - cooling fan will not turn off

    Satellite L750D-14RBIOS - 1.30THIS Version 1.10Temperature CPU Fan of 46% 53% speed Hi, just bought this laptop (5 days), the cooling fan is not turned off, the computer feels cool so don't know why it has run all the time. Read other articles on the

  • Controls on the front panel does not work

    In the attached vi (I've stripped down to simplify things), I have a problem with the controls on the front panel does not when you click on the control to acquire it. It of probably something obvious but got me to loss. Thank you