Search found 187 matches
- 31 May 2012 11:46
- Forum: DOS Batch Forum
- Topic: Change Directory in Batch file
- Replies: 1
- Views: 2620
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...
- 30 May 2012 18:54
- Forum: DOS Batch Forum
- Topic: How do I execute a Java project using batch?
- Replies: 7
- Views: 4922
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...
- 30 May 2012 18:33
- Forum: DOS Batch Forum
- Topic: How do I execute a Java project using batch?
- Replies: 7
- Views: 4922
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...
- 30 May 2012 17:19
- Forum: DOS Batch Forum
- Topic: syntax error
- Replies: 2
- Views: 2693
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...
- 30 May 2012 13:54
- Forum: DOS Batch Forum
- Topic: How do I execute a Java project using batch?
- Replies: 7
- Views: 4922
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...
- 30 May 2012 13:47
- Forum: DOS Batch Forum
- Topic: Une boucle avec la command PING
- Replies: 11
- Views: 8291
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&...
- 30 May 2012 09:44
- Forum: DOS Batch Forum
- Topic: Une boucle avec la command PING
- Replies: 11
- Views: 8291
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.
%1 and %2 are CL parameters.
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.
- 30 May 2012 09:42
- Forum: DOS Batch Forum
- Topic: Wait until several processes have ended
- Replies: 17
- Views: 15472
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...
- 29 May 2012 16:08
- Forum: DOS Batch Forum
- Topic: search pos index and move file
- Replies: 16
- Views: 11770
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?
- 27 May 2012 18:22
- Forum: DOS Batch Forum
- Topic: Looking for a way to show Splash Screen logo
- Replies: 6
- Views: 16424
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.
Anyway, aGerman's solution should work for you. I don't know HTA, but it just seems legit.
- 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...
- 23 May 2012 13:51
- Forum: DOS Batch Forum
- Topic: How to convert AVI to iMovie easy
- Replies: 5
- Views: 6230
Re: How to convert AVI to iMovie easy
Nice! I'm going to test it when I've enough time to.
- 22 May 2012 21:34
- Forum: DOS Batch Forum
- Topic: How to convert AVI to iMovie easy
- Replies: 5
- Views: 6230
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.
- 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"
- 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...