Search found 187 matches

by Fawers
31 May 2012 11:46
Forum: DOS Batch Forum
Topic: Change Directory in Batch file
Replies: 1
Views: 2618

Re: Change Directory in Batch file

In order to open a specific file - whose path is not listed in %PATH% -, you need either the full path for the file or the cmd prompt pointing to the verydirectory of this file - as you said, "change directory". The command is CD. For the command help, type CD /? in your cmd prompt. It's a...
by Fawers
30 May 2012 18:54
Forum: DOS Batch Forum
Topic: How do I execute a Java project using batch?
Replies: 7
Views: 4921

Re: How do I execute a Java project using batch?

Running java -jar (referring to foxi's code) should work flawlessly if you convert your .java to .jar. Creating a jar File in JCreator You can configure a "tool" that will automate the jar creation process. You only need to do it once. Click on Configure/Options. Click on Tools in the left...
by Fawers
30 May 2012 18:33
Forum: DOS Batch Forum
Topic: How do I execute a Java project using batch?
Replies: 7
Views: 4921

Re: How do I execute a Java project using batch?

Thanks for the help, but this didn't work: One command line popped up and called another, which closed without doing anything. I tried entering "java -?" into command prompt like you did, but most of the information was meaningless to me. Should this code execute the java file, or would i...
by Fawers
30 May 2012 17:19
Forum: DOS Batch Forum
Topic: syntax error
Replies: 2
Views: 2691

Re: syntax error

Of course you can't: Firstly, you need delayed expansion if you want to work with variable manipulation within loops. Secondly, you didn't put the IF statements on the same line. @echo off setlocal enableDelayedExpansion FOR /F %%X IN (x/list.txt) DO ( REM echo %%X SET /A "odd=%%X %% 2" if...
by Fawers
30 May 2012 13:54
Forum: DOS Batch Forum
Topic: How do I execute a Java project using batch?
Replies: 7
Views: 4921

Re: How do I execute a Java project using batch?

Well I think you can do it with built-in java? Don't know much of it. But going through a quick reading in java's help (command line: java -? ), maybe you can start it like any other program. Untested: @start java -cp "%javaProgram%" By the way, I'm assuming "javaProgram" is a de...
by Fawers
30 May 2012 13:47
Forum: DOS Batch Forum
Topic: Une boucle avec la command PING
Replies: 11
Views: 8290

Re: Une boucle avec la command PING

Perhaps you didn't understand what I meant? Now my colleague Fawers I know the site, that in IPlist.txt I also can get the IP from the command PING All of these data supposed. But in the txte pass.txt There are : google.com: I changed in the line: "if %errorlevel%==0 >>pass.txt echo :%1:%2&...
by Fawers
30 May 2012 09:44
Forum: DOS Batch Forum
Topic: Une boucle avec la command PING
Replies: 11
Views: 8290

Re: Une boucle avec la command PING

The code he wrote is supposed to have both IP and domain name as parameters in order to echo them both.

foxidrive wrote:

Code: Select all

if %errorlevel%==0 >>pass.txt echo %1:%2&echo pass
if %errorlevel%==1 >>fail.txt echo %1:%2&echo        FAIL

%1 and %2 are CL parameters.
by Fawers
30 May 2012 09:42
Forum: DOS Batch Forum
Topic: Wait until several processes have ended
Replies: 17
Views: 15467

Re: Wait until several processes have ended

Thx a lot. But there is a another little problem. The process I start, is a java application. Therefore, in the tasklist there are several java.exe entries show but I dont know which of them has been started by me. I need a way to distinguish started process in my batch script and processes that ha...
by Fawers
29 May 2012 16:08
Forum: DOS Batch Forum
Topic: search pos index and move file
Replies: 16
Views: 11753

Re: search pos index and move file

darioit wrote:Sorry, I can't use unix script like awk and sed

Are you writing this program for a college work?
by Fawers
27 May 2012 18:22
Forum: DOS Batch Forum
Topic: Looking for a way to show Splash Screen logo
Replies: 6
Views: 16417

Re: Looking for a way to show Splash Screen logo

The only thing I can do with VBS within a batch is show some text, prompt for input and return some output. Never heard of displaying an image with it, although I think it's not impossible.

Anyway, aGerman's solution should work for you. I don't know HTA, but it just seems legit.
by Fawers
25 May 2012 15:37
Forum: DOS Batch Forum
Topic: Command operators
Replies: 5
Views: 5342

Re: Command operators

I have a few basic questions that I don't understand what they do. In this example; for /f "tokens=* delims= " %%a in ('dir/b "C:\Documents and Settings" ^| find /n /v "\\\"') I understand the for /f "tikens=* delims=" but what does the 'dir do exactly, or is...
by Fawers
23 May 2012 13:51
Forum: DOS Batch Forum
Topic: How to convert AVI to iMovie easy
Replies: 5
Views: 6229

Re: How to convert AVI to iMovie easy

Nice! I'm going to test it when I've enough time to.
by Fawers
22 May 2012 21:34
Forum: DOS Batch Forum
Topic: How to convert AVI to iMovie easy
Replies: 5
Views: 6229

Re: How to convert AVI to iMovie easy

foxidrive wrote:Handbrake comes in a command line and a GUI version and will convert to .mp4 or .mkv


Sounds very interesting. Is the command line version easy to use? If yes, I'll download it. I'm not interested anymore in GUI video converters.
by Fawers
22 May 2012 09:29
Forum: DOS Batch Forum
Topic: Copy files if they contain a string
Replies: 3
Views: 12510

Re: Copy files if they contain a string

Perhaps it can be done with FOR /f too?

Code: Select all

@echo off
for /f "delims=" %%a in ('findstr /m /c:"string" *.*') do ^
copy "%%a" "C:\path\to\your\folder"
by Fawers
21 May 2012 07:56
Forum: DOS Batch Forum
Topic: parsing the %CD% variable
Replies: 11
Views: 8691

Re: parsing the %CD% variable

I appreciate the feedback, as it looks like I didn't get sidetracked. Open a cmd prompt in a deep nested folder and use this command (which is inside the for command above). That should show you how the for command is used in this case - because this is what is replaced in the parentheses when it ru...