Search found 3682 matches

by aGerman
02 Jun 2010 11:17
Forum: DOS Batch Forum
Topic: Flash task bar button
Replies: 6
Views: 2912

Re: Flash task bar button

I wrote a small example for. It's tested only on XP. There are some explanations into the code, I hope you will know what you have to change. It is important that you set the number of steps (pbCalcBase) and that you call the subroutine :pb after each step in your code. @echo off &setlocal :: **...
by aGerman
02 Jun 2010 06:20
Forum: DOS Batch Forum
Topic: Sum output from file?
Replies: 2
Views: 1642

Re: Sum output from file?

Try this: set /A tot=0 for /f "tokens=1" %%a in (file.txt) do ( set /A tot+=%%a ) echo %tot% otherwise the variable %tot% will not be changed during the run tim of the for loop. echo %var% and echo.%var% is allmost the same. If var is not defined (has no value) you will get a message if yo...
by aGerman
01 Jun 2010 13:35
Forum: DOS Batch Forum
Topic: Batch File to Search and Copy Results
Replies: 2
Views: 2226

Re: Batch File to Search and Copy Results

You could try something like that: @echo off &setlocal set /p "SEARCHTERM=Enter the Search Term: " set /p "DATEINPUT=Enter the Date (Ex: 2010-05-27) " md "C:\ByDate\%DATEINPUT%" 2>nul cd "C:\TotalListOfTerms" >"C:\ByDate\%DATEINPUT%\%SEARCHTERM%.txt&q...
by aGerman
01 Jun 2010 11:28
Forum: DOS Batch Forum
Topic: Embed objects
Replies: 1
Views: 1353

Re: Embed objects

No, this is impossible. The only things a batch window can show are characters.

Regards
aGerman
by aGerman
01 Jun 2010 11:24
Forum: DOS Batch Forum
Topic: Echoing '|' Doesnt work
Replies: 5
Views: 2902

Re: Echoing '|' Doesnt work

What exactly does output mean? Your standard output is the the batch window. The pipe (|) is for redirecting the stdOut of one command to a second command.

Regards
aGerman
by aGerman
01 Jun 2010 11:18
Forum: DOS Batch Forum
Topic: Whats 2>%1
Replies: 5
Views: 2432

Re: Whats 2>%1

Well, > is for redirecting of an output to a file or a device (eg. printer, screen, NUL). 2 is for redirecting the stdErr (error message) 3 is an user defined channel %1 is the first argument you gave to the batch process I've never seen 2>@1 because this will create a file named "@1" But ...
by aGerman
01 Jun 2010 11:02
Forum: DOS Batch Forum
Topic: Flash task bar button
Replies: 6
Views: 2912

Re: Flash task bar button

No, this doesn't work. You could pop up message boxes using an included small VBScript. Or you could run something like a progress bar in a separate batch window. What would you prefer?

Regards
aGerman
by aGerman
26 May 2010 15:01
Forum: DOS Batch Forum
Topic: How to filter txt file by string with using batch
Replies: 2
Views: 2036

Re: How to filter txt file by string with using batch

Antediluvian, !k is absolutely right. How should we test any code on an image?! And where did you find any 9? Did you mean the 4 in column "Free"? In case the values are delimted by spaces or by tabs the following could work:- @echo off &setlocal for /f "tokens=3" %%a in ('fi...
by aGerman
25 May 2010 14:27
Forum: DOS Batch Forum
Topic: Redirect Twice
Replies: 5
Views: 3424

Re: Redirect Twice

Eagle710, you can't redirect the stdOut of a command twice. But you could call the command as child process into a for loop to get each line to a dynamic variable. This variable you could echo twice. @echo off &setlocal >output.txt type nul for /f "delims=: tokens=1*" %%a in ('dir C:\T...
by aGerman
25 May 2010 14:10
Forum: DOS Batch Forum
Topic: How can I pipe "Y" into netstat.exe to satisfy N/Y demand
Replies: 5
Views: 4999

Re: How can I pipe "Y" into netstat.exe to satisfy N/Y deman

Alan, thanks for your response and detailed explanation. It was verry interresting for me. Well, to be honest, I tried my batch file only without redirection to activity.txt and that worked fine. I have no idea why it does not work if you want to redirect the stdOut. Referring to tskill . I used the...
by aGerman
23 May 2010 17:20
Forum: DOS Batch Forum
Topic: How can I pipe "Y" into netstat.exe to satisfy N/Y demand
Replies: 5
Views: 4999

Re: How can I pipe "Y" into netstat.exe to satisfy N/Y deman

Alan I'm virtually certain there is no trick to pipe y/n after ctrl c. But you could run netstat in a second (minimized ?!) window. Using TASKKILL it should be easy to close it. Give that a try:- @echo off ECHO XLOWTEST IS RUNNING start "NetstatLog" /min cmd /c netstat -b 5 ^>activity.txt ...
by aGerman
23 May 2010 14:04
Forum: DOS Batch Forum
Topic: Command Line Input Adaptation to Batch File
Replies: 4
Views: 4247

Re: Command Line Input Adaptation to Batch File

[...]I don't fully understand the remainder of your batch file[...] @echo off &setlocal This turns off the command prompt and limits changing of the environment to the current batch window. pushd "%~1"||goto :eof pushd changes the working directory. In %~1 you will find the first argu...
by aGerman
23 May 2010 12:36
Forum: DOS Batch Forum
Topic: Graphics in Batch
Replies: 9
Views: 7685

Re: Graphics in Batch

Hi guys. I'm virtually certain that command.com isn't available on a 64 bit OS (because 16 bit apps don't work on it). So you phillid should check it. Here I attached a small tool I wrote in C++. You could try it. But I never got a reply if it would work on a 64 bit Windows OS too. Regards aGerman
by aGerman
22 May 2010 16:43
Forum: DOS Batch Forum
Topic: IF Statement
Replies: 2
Views: 1912

Re: IF Statement

This should work too in case AddItemCode2.txt would exist etc. @echo off if not exist AddItemCode.txt ( set "filename=AddItemCode.txt" ) else ( set /a n=1 call :createNewName ) cls title Java Code Generator echo An example of an item number would be: 995 set /p itemNumber=Please type the i...
by aGerman
22 May 2010 16:25
Forum: DOS Batch Forum
Topic: Command Line Input Adaptation to Batch File
Replies: 4
Views: 4247

Re: Command Line Input Adaptation to Batch File

You could try something like that

Code: Select all

@echo off &setlocal
pushd "%~1"||goto :eof
for %%f in (*.lsp) do find /i "defun C:" "%%f">>%~dp0defunC.txt
popd


Regards
aGerman