Prepend @echo off to the code.
Regards
aGerman
Search found 4506 matches
- 08 Oct 2011 08:39
- Forum: DOS Batch Forum
- Topic: Path inclusion in Dir
- Replies: 16
- Views: 10661
- 08 Oct 2011 08:36
- Forum: DOS Batch Forum
- Topic: errorlevel in a for
- Replies: 4
- Views: 3854
Re: errorlevel in a for
You could try a small workaround
For my understanding if %n% equals 0 it failed.
Regards
aGerman
Code: Select all
for /f "usebackq tokens=2 delims=,:" %%a in (`"wavi.exe test.avs 2>&1"`) do (
for /f %%b in ("%%a") do set /a n=%%b
)
echo channels=%n%
For my understanding if %n% equals 0 it failed.
Regards
aGerman
- 07 Oct 2011 15:49
- Forum: DOS Batch Forum
- Topic: Removing numbers from file names
- Replies: 3
- Views: 3463
Re: Removing numbers from file names
Does the file name always contain 4 letters and 4 digits?
Regards
aGerman
Regards
aGerman
- 07 Oct 2011 15:44
- Forum: DOS Batch Forum
- Topic: plz help !
- Replies: 1
- Views: 1904
Re: plz help !
untested: @echo off color b :pstart Set "input=" set /p "input=Enter Resistent,Influx,Vault (R,I,V): " if /i "%input%"=="R" goto resistent if /i "%input%"=="I" goto influx if /i "%input%"=="V" goto vault echo Wrong input...
- 07 Oct 2011 15:35
- Forum: DOS Batch Forum
- Topic: How to set switches in a batch file
- Replies: 4
- Views: 3815
- 07 Oct 2011 15:32
- Forum: DOS Batch Forum
- Topic: How to compile batch scripts into .exe
- Replies: 2
- Views: 2838
Re: How to compile batch scripts into .exe
Batch is an interpreted language and cannot be compiled at all. There are some bat2exe tools which generate something like a self-extracting archive or an installer. But if you execute the resulting exe it does nothing but extracting your origin source code into the %temp% folder and runs the file t...
- 07 Oct 2011 15:24
- Forum: DOS Batch Forum
- Topic: How to use "find" results as variables
- Replies: 4
- Views: 3905
Re: How to use "find" results as variables
You have to use a FOR /F loop. But it's not enough information to give you detailed help.
Regards
aGerman
Code: Select all
for /f "delims=" %%i in ('find "string" "file.txt"') do set "var=%%i"
Regards
aGerman
- 07 Oct 2011 15:17
- Forum: DOS Batch Forum
- Topic: How to check for text in a text document
- Replies: 3
- Views: 3388
- 07 Oct 2011 15:14
- Forum: DOS Batch Forum
- Topic: UACPrompt Batch
- Replies: 1
- Views: 3760
Re: UACPrompt Batch
I have an idea, but I didn't test it.
Try "%~f0" instead of %0.
Regards
aGerman
Try "%~f0" instead of %0.
Regards
aGerman
- 07 Oct 2011 15:10
- Forum: DOS Batch Forum
- Topic: Path inclusion in Dir
- Replies: 16
- Views: 10661
Re: Path inclusion in Dir
Depends on how to use DIR /B. Do you execute it across the current working directory?
Regards
aGerman
Regards
aGerman
- 07 Oct 2011 15:06
- Forum: DOS Batch Forum
- Topic: How do you read a filename and substring it to variables
- Replies: 2
- Views: 2569
Re: How do you read a filename and substring it to variables
Um, pl/sql sounds like Oracle. Are you sure you could use Windows Batch in this environment?
Regards
aGerman
Regards
aGerman
- 07 Oct 2011 15:02
- Forum: DOS Batch Forum
- Topic: How to Delet all video file format using batch file
- Replies: 7
- Views: 6807
Re: How to Delet all video file format using batch file
Well, in this case you can use my first code. Just use C:\ for root, add all audio and video extensions you know to variable extensions and remove the ECHO command in the last line as I told you before.
Regards
aGerman
Regards
aGerman
- 04 Oct 2011 11:35
- Forum: DOS Batch Forum
- Topic: How to Delet all video file format using batch file
- Replies: 7
- Views: 6807
Re: How to Delet all video file format using batch file
Sorry, but now I'm unsure if I misunderstood your requirement. i need to delet all computer audio video exextensions What does it mean? Do you want to delete each audio or video file? Or does it mean that you want to delete the associations of the file extensions in your registry? Please clarify. Re...
- 03 Oct 2011 18:01
- Forum: DOS Batch Forum
- Topic: ftping files from windows to unix
- Replies: 1
- Views: 1918
Re: ftping files from windows to unix
Since Batch is a Windows script, you can't apply it to UNIX. I'm afraid you should look for support in a UNIX forum instead. I guess it makes no difference whether you try to download from a Windows server or, say, a Linux server but your script has to be compatible with the OS where it should run f...
- 03 Oct 2011 17:35
- Forum: DOS Batch Forum
- Topic: How to determine the number of difference
- Replies: 9
- Views: 5424
Re: How to determine the number of difference
Well Dave your first example shows 4 different lines because that can't be the same George in both files
I guess the problem can be solved using batch as well as using each other language but the rules have to be clearly defined. Without these rules we're groping in the dark.
Regards
aGerman
I guess the problem can be solved using batch as well as using each other language but the rules have to be clearly defined. Without these rules we're groping in the dark.
Regards
aGerman