-1
голосов
3ответов
3947 просмотров

Why aren't a batch file's environment variables set when run from Perl?

I am trying to invoke a bat file from a perl script as follows: system("call D:/SIP/run_$file_idx.bat"); However I observe that the environment variables in the bat fail to get resolved. If I run the bat file separately from the command prompt it works. Does system() create a new environmen...

2
голосов
2ответов
1418 просмотров

How to get entire svn commit message in window bat?

I need get the SVN commit message in post-commit hook bat in Windows, so I do this: FOR /F "tokens=*" %%a in ('"svnlook log %1 -r %2"') do @SET MSG=%%a I test it, it's ok for most case. but, when I input multiple lines in SVN commit message, the command can only get the last line of commit me...

1
голосов
1ответов
155 просмотров

What is the optimum number of sqls run in batch?

I am trying to load the data in Oracle server remotely. I am doing "executeBatch()" for every 50 sqls that are added in batch. (thru JDBC) What is the optimum number of sqls run in batch? Is it unlimited?

0
голосов
2ответов
420 просмотров

SQL select groups of distinct items in prepared statement?

I have a batch job that I run on a table which I'm sure I could write as a prepared statement. Currently it's all in Java and no doubt less efficient than it could be. For a table like so: CREATE TABLE thing ( `tag` varchar, `document` varchar, `weight` float, ) I want to create a new ta...

1
голосов
2ответов
969 просмотров

Batch program script problem breaks with file names with spaces

The following is a batch script that calls mp3splt (a program that splits mp3s http://mp3splt.sourceforge.net/mp3splt_page/home.php) into partitions of 5 mins long. for /f %%a IN ('dir /b *.mp3') do call c:\PROGRA~1\mp3splt\mp3splt -t 5.0 -o output\@[email protected][email protected] %%a It breaks when the mp3 file...

0
голосов
1ответов
44 просмотров

best way to automate updates installs

I wanted to know if there was a way to have an app automate to answer the questions.. I have created a batch file that starts the app in the start up folder. so I have 2 problems, one was deleting the batch file once it ran from that folder 2. answering the questions for the app? Is that even ...

17
голосов
7ответов
39261 просмотров

Running another program in Windows bat file and not create child process

I have subversion server with a post-commit hook to do something. I want the checkin finish soon, not wait the hook script. But by design, the Subversion post-commit hook script will run until all child process exit, so using somthing like: start another_prog... in the hook bat file has no us...

3
голосов
1ответов
499 просмотров

Windows Scripting: What and How to do this? Batch Files or Something else?

What I am trying to do is have some sort of script run in windows (ideally .cmd file/batch file) when double clicked it should create a short-cut menu in the start menu and set a path in the windows registry (i think thats what it is called) so that next time, for example, all I have to is get th...

0
голосов
1ответов
345 просмотров

running bat file using windows scheduler

i wanted to run a .bat file in windows task scheduler, so i opened it, added a new task, browsed to the bat file, and... nothing happened. so i changed the timing to see if it'll run, and it didn't. next i right-clicked on the task and chose "run"- it didn't run. the file itself is only one line,...

0
голосов
3ответов
316 просмотров

Deleting file from batch file giving error

I am facing error when i try to delete a file using a batch file. For example say the file i want to delete is "C:\test\a.dll" i get the folder "c:\test" from registry and then i try to append the file name using and delete it using the following command del /s %WPINSTDIR%\a.dll where i get WP...

8
голосов
6ответов
28220 просмотров

Windows batch file - The system cannot find the batch label specified

The Problem I'm having a problem with a Windows batch file and labels. I keep getting this error: The system cannot find the batch label specified What I've tried Two computers; a WindowsXP and a 2003 Server. Made sure it was encoded as ASCII Editted the hex code for the line continuat...

0
голосов
3ответов
15800 просмотров

Windows batch file - check if file has been modified

I'm configuring a windows machine to continuously run a powerpoint presentation. The ppt file is located on a samba share (windows file sharing) and will be updated periodically. I need a way to make a batch file that will restart the ppt slide show if the file has been changed. The batch scri...

3
голосов
3ответов
29787 просмотров

Batch command to take only first line from input

I'm looking for a DOS batch program that takes a file: First input line Second input line Third input line... And outputs "First input line"

35
голосов
2ответов
157943 просмотров

How to input a string from user into environment variable from batch file

I want to prompt the user for some input detail, and then use it later as a command line argument.

6
голосов
7ответов
10687 просмотров

VBScript, JScript, Wscript ... oh my

I need to write some scripts for WinXP to support some of the analysts here at Big Financial Corp. Please help me decide which type of windows scripting best fits my needs. My needs seem pretty simple (to me anyway) run on WinXP Pro SP2 (version 2002) not require my users to install anything ...

1
голосов
2ответов
3879 просмотров

Launching an independent process from a .bat

I have a Hudson job that launches a .bat script file that itself launches my Jonas application server and a couple of other tasks too. The script is properly launched from Hudson on my slave, then my application server is started but at the moment my Hudson job ends the application server is kil...

5
голосов
4ответов
24374 просмотров

Calling a web service from a script or batch file

We have a financial product that has built in scheduling capabilities to run over night batches. This product can also use web services to kick off each batch as required. I want to know if it is possible to call the web services from a .bat file or another type of batch/script file. If this is...

0
голосов
2ответов
2731 просмотров

Windows batch-file errorlevel question

I've got a batch file that parses a bunch of file names out of a text file and concatenates them into a single strong - it was previously discussed here. However, I don't want the string to contain a file if the file throw an error when I run it through some command (like a VCS check, for example...

6
голосов
7ответов
13124 просмотров

Replacing characters in a text file with a batch file

Is there a way to replace some characters in a text file with a batch file? I didn't find any command to do that.

13
голосов
6ответов
34382 просмотров

Floating point division in a batch file

I need to do a floating-point division in a dos batch. I didn't find a way to do it. Something like this : SET /A Res=10/3 returns a integer number. Is it possible to do it ?

16
голосов
10ответов
27599 просмотров

Problem running .bat file on Windows due to "input line is too long"

I'm using Windows and have a batch file (contents attached below) where I'm building up a classpath before trying to run a Java class. Unfortunately the classpath is fairly big and the file ends up being ~14kb. When I run it I'm getting an 'input line too long' error. I have read elsewhere tha...

87
голосов
11ответов
334699 просмотров

How to delete all files and folders in a folder by cmd call

I use Windows. I want to delete all files and folders in a folder by system call. I may call like that: >rd /s /q c:\destination >md c:\destination Do you know an easier way?

3
голосов
2ответов
7564 просмотров

Windows .BAT to move all directories matching mask from dir A to dir B

I want to write a .BAT file to move all sub-directories (whose name matches a mask) of C:\WINNT\Temp to H:\SOMEOTHERPLACE. So if my mask is ABC* then the directories : C:\WINNT\Temp\ABC1 C:\WINNT\Temp\ABC2 C:\WINNT\Temp\ABC3 should be moved to H:\SOMEOTHERPLACE and everything else (inclu...

0
голосов
1ответов
130 просмотров

Is there a way to run a batch file when opening Visual Studio or a project/solution?

I use SUBST to map a common drive for referencing some DLLs. I have been running a batch file in my startup folder to do the mapping, but I'd like to have the drive "gone" when I'm not working in Visual Studio. Is there a way to automatically run command line instructions when opening/closing ...

1
голосов
3ответов
18564 просмотров

running a batch file from oracle forms 6i using host

I am trying to run a batch file. the file is located here: C:\Program Files\Java\jre6\bin\getfile.bat I use this in oracle forms 6i: first i assign this path to a variable: tmp_msg := 'C:\Program Files\Java\jre6\bin\getfile.bat' then I use the host command: host( 'cmd /c' || tmp_msg, no_sc...

1
голосов
4ответов
4131 просмотров

Windows XP batch file concat

I'm trying to accomplish the following ridiculous task: I have a text file containing a set of fully qualified filesnames. I want to iterate through the file and append each line to a common variable, that can be passed to a command line tool. For example, the file might be: C:\dir\test.txt C:\W...

18
голосов
3ответов
30146 просмотров

Batch : Checking the number of parameters

I'd like to make sure that when calling my batch, no more than 2 parameters are passed. Is there an easy way to check that, or do I have to call SHIFT as many times as needed until the parameter value is empty ?

0
голосов
1ответов
967 просмотров

how to write batch script file to install Tomcat and other

Hai to all, Please let me fly on top , I really strucked up at creating a batch file , which installs Tomcat and my java exe application and copy some files to the specified directory and it has to close automatically. thanks in advance .

2
голосов
3ответов
399 просмотров

Is there a way to have a Windows shell script execute everything relative to its location rather than the location it was invoked from?

I'm aware of %~dp0, which represents the fully expanded directory that contains the batch script, but what I'm looking for is either: a method to invoke the batch script from Perl in such a manner that allows me to use the batch script without modification and have all directories in it be in r...

13
голосов
4ответов
20561 просмотров

What does the @title batch script command do?

I see it a few times in my batch script, however I'm not certain what it actually does. The two occurrences of it are below an @echo (which prints out the text following it to the console) and are exact duplicates of the text that is printed with @echo.