Search found 26 matches

by sp11k3t3ht3rd
30 Jul 2010 19:53
Forum: DOS Batch Forum
Topic: Opening a file in a different folder
Replies: 16
Views: 16148

Re: Opening a file in a different folder

Thanks!! Now I'm moving the java files to a folder called bin. This is my compile part of my batch file and it works. :compile cls if exist "Bin" ( javac *java move *class "Bin" >NUL pause cls ) else ( md Bin javac *java move *class "Bin" >NUL pause cls ) if exist "...
by sp11k3t3ht3rd
30 Jul 2010 17:18
Forum: DOS Batch Forum
Topic: Opening a file in a different folder
Replies: 16
Views: 16148

Re: Opening a file in a different folder

I went through the program and entered the classname and then got this. C:\Users\Mike.Mike-PC\Desktop\Programming\Java>pushd bin The syntax of the command is incorrect. C:\Users\Mike.Mike-PC\Desktop\Programming\Java\bin> >"classnameclassname C:\Users\Mike.Mike-PC\Desktop\Programming\Java\bin>
by sp11k3t3ht3rd
30 Jul 2010 11:43
Forum: DOS Batch Forum
Topic: Opening a file in a different folder
Replies: 16
Views: 16148

Re: Opening a file in a different folder

Have fun! :wink:


Thanks! I just got back. I tried that but when I run it and get to that point in the code it says "The syntax of the command is incorrect." and then the window closes really fast.
by sp11k3t3ht3rd
25 Jul 2010 19:55
Forum: DOS Batch Forum
Topic: Opening a file in a different folder
Replies: 16
Views: 16148

Re: Opening a file in a different folder

Just so you know, I'm only 15 years old. This week I'm going to be at a summer camp, so I will not be able to get your response because it's a sleep away camp.
by sp11k3t3ht3rd
25 Jul 2010 19:34
Forum: DOS Batch Forum
Topic: Opening a file in a different folder
Replies: 16
Views: 16148

Re: Opening a file in a different folder

Its still not working. I know that you can change drives from the command line. Is there something similar that we can do here? The reason I don't want to make the run file every time is for ease of use.
by sp11k3t3ht3rd
25 Jul 2010 13:50
Forum: DOS Batch Forum
Topic: Opening a file in a different folder
Replies: 16
Views: 16148

Re: Opening a file in a different folder

This is the folder structure. Java > bin > other project folders The original batch file is at C:\Users\Mike.Mike-PC\Desktop\Programming\Java The classes along with the run.bat created go to C:\Users\Mike.Mike-PC\Desktop\Programming\Java\bin When the original file it run it is run from outside the b...
by sp11k3t3ht3rd
25 Jul 2010 13:10
Forum: DOS Batch Forum
Topic: Opening a file in a different folder
Replies: 16
Views: 16148

Re: Opening a file in a different folder

That code isn't working: if /i "%classname%"=="BeerSong" ( >%classname%.txt 2>&1 java bin\%classname% start %classname%.txt ) else ( >bin\run.bat echo @echo off >>bin\run.bat echo title Run >>bin\run.bat echo java %classname% >>bin\run.bat echo pause >>bin\run.bat echo del /s...
by sp11k3t3ht3rd
25 Jul 2010 11:53
Forum: DOS Batch Forum
Topic: Opening a file in a different folder
Replies: 16
Views: 16148

Opening a file in a different folder

Okay, with my previous question about the Java. Now I made it so when you compile it puts the files needed to run in a folder called bin. I need to be able to open a file and then delete it after its closed. if /i "%classname%"=="BeerSong" ( >%classname%.txt 2>&1 java %classn...
by sp11k3t3ht3rd
24 Jul 2010 23:17
Forum: DOS Batch Forum
Topic: Java Compiler Help Needed! (I'm using batch)
Replies: 5
Views: 5790

Re: Java Compiler Help Needed! (I'm using batch)

:run cls set /p classname=Enter the class name: cls if /i "%classname%"=="BeerSong" ( >txt.txt 2>&1 java %classname% ) else ( java %classname% ) pause cls Is there a way to change it so that it goes to a folder called bin to get the %classname% For example: My folder "J...
by sp11k3t3ht3rd
24 Jul 2010 12:26
Forum: DOS Batch Forum
Topic: Java Compiler Help Needed! (I'm using batch)
Replies: 5
Views: 5790

Re: Java Compiler Help Needed! (I'm using batch)

What I want to do is have everything that is run through the cmd to be copied and placed in a txt file. I want to do that because not everything in the class can be seen at runtime in the cmd because it has to many lines to print out. The Java program prints out the song 99 bottles of beer on the wa...
by sp11k3t3ht3rd
24 Jul 2010 10:33
Forum: DOS Batch Forum
Topic: Java Compiler Help Needed! (I'm using batch)
Replies: 5
Views: 5790

Java Compiler Help Needed! (I'm using batch)

Okay I'm using a batch file to compile and run my java programs. This is the code: @echo off title Mike Spallino's Java Compiler and Runner :start cls echo.----------- echo Options: echo c - Compile echo r - Run echo.----------- set /p input=Option: if %input%==C goto compile if %input%==c goto comp...
by sp11k3t3ht3rd
10 Jun 2010 16:31
Forum: DOS Batch Forum
Topic: If file is exited
Replies: 7
Views: 7447

Re: If file is exited

Thanks!!!!!!!!!!! :D
by sp11k3t3ht3rd
10 Jun 2010 16:12
Forum: DOS Batch Forum
Topic: If file is exited
Replies: 7
Views: 7447

Re: If file is exited

I wouldn't need to see the message with this modified code... @echo off title CHECKER1 set /p op=Type the file name you want to be tested to run. (Omit the file extension and make sure the batch file title is the name you enter.): REM loop while %op%.bat is not running :loop1 tasklist /nh /fi "...
by sp11k3t3ht3rd
10 Jun 2010 14:11
Forum: DOS Batch Forum
Topic: If file is exited
Replies: 7
Views: 7447

Re: If file is exited

example.bat @echo off title EXAMPLE pause check.bat @echo off REM loop while example.bat is not running :loop1 tasklist /nh /fi "windowtitle eq EXAMPLE" 2>nul |findstr /l "cmd.exe" >nul || ( ping -n 2 localhost>nul goto :loop1 ) REM loop while example.bat is running :loop2 taskl...