Search found 4 matches

by landuchi
18 Jun 2010 17:52
Forum: DOS Batch Forum
Topic: Help with the FOR command, get current iteration number
Replies: 3
Views: 5368

Re: Help with the FOR command, get current iteration number

I didn't know what delayed expansion was for... I just graved it from the script examples. After reading about it, I realize the solution was in the very first line of my script. Thank you for the reply. Updated code below: SETLOCAL ENABLEDELAYEDEXPANSION REM.-- Extensions to process Set extensionLi...
by landuchi
17 Jun 2010 22:18
Forum: DOS Batch Forum
Topic: Help with the FOR command, get current iteration number
Replies: 3
Views: 5368

Re: Help with the FOR command, get current iteration number

Searching the forums, I found the subroutine trick, updated the batch and it's working now . Anyway is there a simpler way of knowing the current iteration number other than using SET /A variable+=1 ? Corrected code below in case someone finds it useful. SETLOCAL ENABLEDELAYEDEXPANSION REM.-- Extens...
by landuchi
17 Jun 2010 21:55
Forum: DOS Batch Forum
Topic: Help with the FOR command, get current iteration number
Replies: 3
Views: 5368

Help with the FOR command, get current iteration number

Hello! I am trying to write a little batch file to process video files with ffmpeg. I would like to be able to know the progress of the process, ie "Processing file 2 of 23". Below is the code I have so far, but all I get in the window tittle is... "Processing file 0 of 23". I ca...
by landuchi
26 Jun 2008 15:36
Forum: DOS Batch Forum
Topic: Redirecting output from echo
Replies: 0
Views: 8324

Redirecting output from echo

I want to redirect the output of echo into a binary and then redirect the output of the binary into a file. The idea would be something like this: echo "query" | binary.exe > output.txt echo "select first 1 cod_compra from compras;" | isql -u SYSDBA -p masterkey c:\bases\hsm.gdb ...