batch

Is there any way to trace through the execution of a batch file?

I inherited some large batch files, and I'd like to rewrite them to a more "developer friendly" language. I'd like to find out the following things: what other scripts it calls what other processes it starts what files does it write to what environment variables it uses, which ones does it set For the last point, I'm aware I can do...

Oracle - grouping between pairs of records

I have a logging table that contains data that looks like this: ID MSG DATE --------------------------------------------- 1 TEst 2010-01-01 09:00:00 2 Job Start 2010-01-01 09:03:00 3 Do something 2010-01-01 09:03:10 4 Do something else 2010-01-01 09:03:12 5 Do so...

SQL Server 2008 - how to zip backup files and move to remote server

Hi, I have the non-enterprise edition of SQL Server 2008. I do nightly backups, manually zip the files and then manually copy to a remote server. I need to automate this using batch files. Copying files from server to server is easy but how do I automate the zipping of the backup first? The full process I need is: Run the backup nig...

How would I write this shell script as a Windows batch script?

I haven't had a chance to test this script, I'm just using it as a suitable pseudocode. It's just supposed to copy all files in the current directory into a timestamped subdirectory. ID="$(date +%Y%b%d%H%M%S)" COMMITABLE="$(ls | egrep --invert-match ^(STATES|PARENT)\$)" STATE_PATH="$(pwd)/STATES/$ID" mkdir --parents "$STATE_PATH" cp $CO...

Batch Scripting Question - Search and Replace a Variable in a Variable?

Hello all! I have a problem. I have a batch file which imitates the UNIX cd command. It takes a UNIX-style path inputted by the user, saves it as a var called upath2, converts it to a Windows-style path, and cd's to that directory (e.g. "/program files/7-zip" will become "C:\Program Files\7-Zip"). The Windows-like output will be saved a...

Is it worth migrating to NHibernate 2.x from NHibernate 1.2?

We are using nHibernate 1.2 in a system which is not performing good. Will there be some performance improvement if we migrate to latest version of nHibernate? Overall is it a good idea to migrate to the latest version of nHibernate? EDIT: I want to use following features to improve performance. 1. Second level cache. 2. Joined Tab...

Batch file to java test

I have a very simple question and I've even searched here but it's for a much simpler case than what I found examples of. I have a java program which has a simple System.in on the main function....I simply want to make a bat file which will run the java program and then enter the input stream automatically. What I basicly want is this m...

starting a windows executable via batch script, exe not in Program Files

This is probably batch scripting 101, but I can't find any clear explanation/documentation on why this is happening or if my workaround is actually the solution. So basically any terminology or links to good sources is really appreciated. So I have a program I want to execute via batch script (along with several other programs). It's th...

create photoshop action/droplet with variable output

I was wondering how to: create a droplet that saves to a relative filepath. let's say the droplet is on the desktop in the folder "batches" and this folder also contains the folder "output". Everything that gets dropped will end up in the output folder. I've noticed that photoshop saves a fixed path to this folder. This renders the dro...

Comparing Folders and Subfolders files using batch command

Hello Everyone, I have two folders. I want to compare the files inside these folders.There are some subfolders in root folders. These sub folders are also containing some files. I want to compare these files in subfolder also. For that I am trying to write a batch file. Any kind of solution will help me a lot ...

Folder Comparsion

Hi, I have two folders with sub folders. One folder is base folder other one is local folder These folders & subfolders consist identical as well as non identical files. I want compare these folders and report the result in some other file This report must consist of 1. List of All identical files 2. List of All modified files 3. List ...

Get other than error level from exe

Hi. Is it possible to get a return value other than error level from .net exe? The exe is to be called from a script, batch or rexx. If not, can you invoke a method in an assembly from batch or rexx and retrieve a return value? ...

Writing a simple bat file?

I am writing a simple batch file and i get this "The syntax of the command is incorrect" error for the if statement.The batch file is as below: @echo off set ARCH=%PROCESSOR_ARCHITECTURE% if %ARCH% == 'x86' ( ) I also tried if %ARCH% EQU 'x86' What is wrong with the if statement? ...

Batch command getting error

Hi Guys, I wrote a simple batch file which checks whether the c drive path exists then execute the exe in that path else try the d drive path and execute it. IF EXIST c:\program files\x goto a ELSE goto b :a cd c:\program files\x executable.exe c:\temp\col.zip :b cd d:\program files\x executable.exe c:\temp\col.zip Im getti...

Batch folder of images into grayscale using php

Can anyone spot where I'm going wrong here. It should be creating grayscale copies of images in one folder and saving them in another folder. Could it be to do with the way im referencing the file locations. Folder permissions on both folders are 777. Script is running without visible error but no images are being created. function gra...

Run bat file in Java and wait

You would think that launching a bat file from Java would be an easy task but no... I have a bat file that does some sql commands for a loop of values read from a text file. It is more or less like this: FOR /F %%x in (%CD%\listOfThings.txt) do sqlcmd -Slocalhost\MSSQL %1 %2 -d %3 -i %CD%\SQLScripts\\%%x exit Don't worry about the spe...

How do I use a batch copy to update files?

Hello, I need help writing a batch file to update templates on a database. Basically, all our clients have their own folder, with multiple templates inside. Due to the computer illiteracy of my office (sigh), there's no real better way to fix this. However, I need a way to update those templates in a batch. For instance \\SERVER\New C...

Ado.net dataservices BeginExecuteBatch call works on development fails on production server with Object does not match target type

We have an ado.net dataservices 1.0 call that is being passed to a [WebGet] service operation as a batch through BeginExecuteBatch. Everything works perfectly on our development server - we have the project configured to use IIS instead of the cassini web server to make it as close to our production server as we can. When we publish t...

Delphi: wait until bat-script runs to the end

I have bat-file, that make some operations. How to run this file from Delphi and wait, until it stops. Something like that: procedure TForm1.Button1Click(Sender: TObject); begin //Starting bat-file bla-bla-bla showmessage('Done'); end; ...

Run bat file in Java and wait 2

This is a followup question to my other question : http://stackoverflow.com/questions/2434125/run-bat-file-in-java-and-wait The reason i am posting this as a separate question is that the one i already asked was answered correctly. From some research i did my problem is unique to my case so i decided to create a new question. Please go ...