Other Languages - .bat files
Asked By Henry Taylor on 16-May-12 03:49 PM
I am trying to execute the same program multiple times from a .bat file. There is logging going on so the program cannot run two instances at once because we get errors trying to open and write to the log file if it is already in use.
The /wait and /b options are used to control that but it is not working. /b tells the next process to use the same window.
Here is a sample file:
start "Batch Process" /wait "BatchProcessScriptor.exe" 290,2/23/2012
start "Batch Process" /wait /b "BatchProcessScriptor.exe" 310,2/23/2012
start "Batch Process" /wait /b "BatchProcessScriptor.exe" 320,2/23/2012
start "Batch Process" /wait /b "BatchProcessScriptor.exe" 330,2/23/2012
start "Batch Process" /wait /b "BatchProcessScriptor.exe" 340,2/23/2012
The processes that are supposed to run here are 290, 310, 320, 330 and 340 in that order. 290 always starts first but then things go bad and it might jump to 330. It doesn't seem to be "waiting" before executing the next line. It seems like it is trying to run all of them at once.
S K replied to Henry Taylor on 16-May-12 11:34 PM
You can use sleep to wait for your desired time interval so you put these command where you want to wait
hope this helps you
Henry Taylor replied to S K on 04-Jun-12 09:29 AM
The way to do this is to forget about .bat files and go with PowerShell:
#If your scripts don't run execute the command below:
cd "c:\Program Files\XCorp\Scheduler"
$runDate = Get-Date "5/18/2012"
$batchList = (290,310,320,340,380)
$BPScriptor = "BatchProcessScriptor.exe"
foreach ($batch in $batchList)
start-process $BPScriptor $batch, $runDate -wait
bat files Other Languages 28-Oct-12 07:32 PM I have a .bat file that is supposed to start a console exe created with vb.net vs2010. The .bat file starts and issues the command and my console window opens but the program does The program runs fine from the IDE but when attempting to run it from the .bat file it just doesn't run. Arggggg! When I try to run the exe from the .bat file I see: WRONG! When I run the program from the IDE I see something like this: RIGHT! :) This is maddening! Any help? Thanks. Henry What is in the .bat file? Make sure you put the full path to the exe in your .bat file The way to do this is to forget about .bat files and go with PowerShell: #If your scripts don't run execute the command below
Hi Everyone ! Can any one share me the link of software that can convert *.exe to *.bat file or any idea convert it. . . Thanks Farrukh that isn't normally possible to do a compiled program and as such what it actually does is opaque to the user bat files are scripts of dos commands or the like and so can be read by to use to get c# from it but that still wouldn't give you a bat file what does the exe actually do? HI Pete rainbow, The .exe actually call third party application and execute data loading process, i want to edit in the .bat file and again make .exe. Before i have create a bat to .exe via convertor, now iam un able to recompile it. I have find the link of convertor .exe to .bat. But unable to download. . . http: / / www.governmentsecurity.org / forum / index.php?showtopic = 26075 Thanks farrukh You can use Third party tool to convert exe file to bat file. Download tool fron here- • Attached File SuperExe2bat.zip Hope this will help you. HI
Bat File Login Username & Password Windows XP 28-Oct-12 08:14 PM Hi, I am having trouble with creating a login bat file. I am using Windows XP Pro. This calls a bat file that will connect to a database, but I cant get the username to work PASSWORD ) ELSE ( GOTO ERROR ) :PASSWORD IF "123" = = "%2" ( @ECHO WELCOME %USERNAME%. PAUSE> NUL CALL ZZV912G56.BAT ) ELSE ( GOTO ERROR ) :ERROR @ECHO YOU TYPED INCORRECT USERNAME / PASSWORD. @ECHO PLEASE TRY AGAIN. GOTO Cheers keywords: Windows XP, Windows XP Pro, insensitive, Login, database, Login username, GOTO ERROR description: Bat File Login Username & Password Hi, I am having trouble with creating a login bat file. I am using Windows XP Pro. This calls a bat file that will conn
I am doing this: Set WShShell = Server.CreateObject("WScript.Shell") WShShell.Run "path to validate.bat" validate.bat is connecting to an AS400, sending data ( / I) and receiving a reply ( / O): zsockc / I validate.txt / O:cirout.txt SERVER PORT The problem is if I run validate.bat from the command window, it works fine, but if I run it from the ASP vbCrLf & "x'03'" & vbCrLf Set WShShell = Server.CreateObject("WScript.Shell") WShShell.Run "c: \ forms \ validate.bat" myTS.Close Set myTS = Nothing Set myFSo = Nothing Set WShShell = Nothing %> keywords: Set WShShell, CreateObject I am doing this: Set WShShell = Server.CreateObject(WScript.Shell) WShShell.Run path to validate.bat
Hi all, I'm trying to schedule a bat file in enterprise manager so that it will run every day. I have this as 2. It does not fail either. It seems like it hangs. I tried running the bat file manually (clicking on the bat file )and it works. I don't know why it would not work with the after selecting 'Operating System Command (CmdExec)' , In the command window you can type C: \ schedule .bat (This will call the batch file schedule .bat based on the schedule interval) Thanks for your reply. This is what I have done and it runs the bat file. But then step1 never exits and stays in running mode. It actually doesn't that it is running step1. Now as I said if I double click on the bat file itself it will run, accomplish its task and then it will exit. It just
what are the diff between .bat , .bak , .cmp extensions in sharepoint 2010? what are the uses ? what are the limitations in sample export: stsadm -o export -url http: / / yourservername / a_site -filename c: \ a_sitebackup Where as a bat file is a Batch file Using bak file you can backup a Site Collection , Regards, .BAK: The BAK file type is primarily associated with 'Backup'. .bat : The BAT file type is primarily associated with 'Batch Processing' by Microsoft Corporation. DOS batch file. A is an ASCII file of commands that run as a program would run. If your BAT file extension association has been disabled, see the Associated Links for a possible fix. Note Import history keywords: SharePointbackup, date, Library, Site, Microsoft Corporation description: what is the diff between .bat , .bak , .cmp extensions in sharepoint 2 what are the diff between .bat , .bak , .cmp extensions in sharepoint 2010 what
any configuration or statement required in config.sys or autoexec.bat to run exe faster Hi, I dont think there is any special things that you a look at http: / / www.computerhope.com / ac.htm , http: / / en.wikipedia.org / wiki / AUTOEXEC.BAT and http: / / www.geos-infobase.de / ND_DOCS / 206.HTM for all types of details about c: \ dos \ emm386.exe ram noems dos = high device = c: \ dos \ setver.exe sample autoexec.bat @echo off c: \ dos \ smartdrv.exe set prompt$p$g set dircmd = / o set path have to change all the paths to be correct for your system. keywords: wiki AUTOEXEC.BAT, disk, VB, autoexec.bat, config.sys description: config.sys and autoexec.bat any configuration or statement required in config.sys or autoexec.bat to run exe faster 28-Oct-12 08:13 PM
Hi, I'm working with MS-Biztalk and I would like to call a '.bat' script as the last step of an orchestration. I'm looking for a way to call this '.bat' file in an 'expression' orchestration module or in a C# class. = = > I can do it regards, Franck System.Diagnostics.Process namespace to invoke an external executable. This should work with .bat files too hi, For this u need to import System.Diagnostics into your code behind keywords: module, class, VB, Microsoft Biztalk, Import, expression orchestration, orchestration description: how to call a ' bat' file from C# Hi, I'm working with MS-Biztalk and I would like to call a '.bat' script as the last step of an orchestration. I'
Instead of creating mulitple lines and dumping them to a .bat file and then executing the .bat file, is there a way to create a multi line string and dump it to Snippets.Replace keywords: VB.NET, SendKeys, Script, Replace, shell command, line string description: replacing a .bat file with multiple lines into a shell command Instead of creating mulitple lines and dumping them to a .bat file and then executing the .
Hi, I did Scheduled Backup Successfully in Sharepoint 2010, i saved that file as .bat extension. Now i want to restore that Backedup file(.bat file) in sharepoint 2010, How can i do that one in sharepoint 2010? Explain me restoring is large, the process can take quite a while. Backup steps. 1. Create a BAT file and write the following commands in that file @ECHO OFF set PATH = C: \ Program URL = "http: / / ebizassist.com" stsadm -o backup -url %URL% -filename %BackupPath% pause 2. Run the Bat file to take the backup from 172.29.8.6 to the backup path Restore Steps 1. Create a BAT file and write the following commands in that file @ECHO OFF set PATH = C: \ Program http: / / ebizassist.com" stsadm -o restore -url %URL% -filename %RestorePath% -overwrite Pause 2. Run the Bat file to restore the ARCA.bak to the share point site You can simply use 2010, SharePoint Server 2007, SharePoint 2010, SharePoint, Office description: How can i restore the Backedup (.bat) file in sharepoint 2010 Hi, I did Scheduled Backup Successfully in Sharepoint 2010, i saved