batch-file

How to execute a batch file on a remote computer?

I would like to be able to run a batch file on a remote computer after a build, where the build output and batch file are living on the build machine. In other words, i want the batch file that is running on the remote computer to be located on the build server, available through a UNC path. I've looked at WMI (System.Management) names...

Getting the file name without extension in a Windows Batch Script

I'm trying to create a right-click context menu command for compressing JavaScript files with YUI compressor. My ultimate goal is to try to get this to run on a context menu: java.exe -jar yuicompressor-2.4.2.jar -o <filename>.min.js <filename>.js I know I can use the variable %1 to reference the file name being opened. I can't figure...

how to remove system environment variable by using batch file

I need to remove system variables from client workstation and my clients are 500+ so I want to provide batch file to user to run himself to delete the system variables. ...

How do I get the output of an external command in Perl?

I want to have output of Windows command-line program (say, powercfg -l) written into a file which is created using Perl and then read the file line by line in a for loop and assign it to a string. ...

ja chars in windows batch file

What is the secret to japanese characters in a Windows XP .bat file? We have a script for open a file off disk in kiosk mode: @ECHO OFF "%ProgramFiles%\Internet Explorer\iexplore.exe" –K "%CD%\XYZ.htm" It works fine when the OS is english, and it works fine for the japanese OS when XYZ is made up of english characters, but when XYZ ...

how to run a batch file from java?

Hi experts, I am trying run a batch file from my java codes, but unfortunately I could not run it properly. Actually the batch file is running but only the first line of the batch file is running, so please give solution to it, here are the codes and the batch file. class bata { public static void main(String [] args) { try { Runtime...

Windows batch file to change monitor settings

Hello everyone, I have a desktop computer that is hooked up to 3 different monitors of which only two can be active at any one time. One is a primary monitor and is always active. I can manually switch between the other two: one a monitor, another an HDTV. The switch is a mechanical switch which only handles VGA (and at that, only the...

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 . ...

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 Visual Studio and/or when opening a projec...

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

Hi - 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 (including files, as opposed to directories,...

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

Hi, 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 u know an easier way? ...

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

Hi, 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 that the max. size for an env variable i...

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). Here's my attempt: set FILE_LIST= for ...

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 possible then we can call the batch file ...

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 killed. This is due to the fact that all the ...

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 script will run on a a regular interval, and w...

Deleting file from batch file giving error

Hi 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 WPINSTDIR from registry and it would be...

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

Hello all, 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 the variable JAVA_HOME to get th...

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 use. So I want to know how to run another p...

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 environment and execute bat file in that? What is th...