Mate de Vita

Mate de Vita

User name
Mate de Vita
Assigned title
Assigned post color
Registration date
2008 October 4
Post count
159 ₧
Planting at B
...and that's the bottom line because Mate de Vita said so.

Recent posts by Mate de Vita

Recent posts by Mate de Vita

2018 Jan 29 at 19:50 UTC
Dragon Ball FighterZ in Vidja Games
I paid double what superjer did.
2015 Aug 13 at 20:49 UTC
The Quiet Truck in General
2015 Aug 3 at 18:45 UTC
Help. in General
BloodFarts said:
I assaulted a spider with a cactus. I think it has rights to an attorney but I'm not sure. Help plz.

Your question is somewhat ambiguous, are we talking about the spider's rights or the cactus'?
2015 Apr 8 at 20:50 UTC
I'd say the older games tend to be longer actually.
2015 Mar 19 at 20:59 UTC
I have no strong feelings one way or the other.
2015 Mar 9 at 22:10 UTC
Batch in if( while ) switch{ coding } ++
To be fair, Windows does have Powershell, which is slightly better than the standard command prompt.
2015 Mar 7 at 18:51 UTC
Batch in if( while ) switch{ coding } ++
I've done a bit of scripting in Bash in one of my classes but I'm pretty much completely new to batch scripts. I would like to run the following command from a batch script:
java -cp "C:\path to external jar;C:\Path to Java project bin" main.MP3Edit [-p path_to_target_dir] [File1 ...]

by allowing the user (me) to input the path to target directory and the file names into the command prompt terminal (yes, I could read the input in the Java program itself but let's say I'm running someone else's program and can't change it).

I've written the following batch script using a few things I found on Google:
@echo off
set /p "arg=Input the path to target directory (defaults to current directory if left empty): "
if not [%arg%]==[] set "arg=-p %arg%"

echo Input file names one per line. If no file names are input, all files in the target directory will be used.
set /p "line=Input next file name (leave empty to end list of files): "
if [%line%]==[] goto run
set "arg=%arg% %line%"
set line=
goto loop

REM java -cp "C:\path to external jar;C:\Path to Java project bin" main.MP3Edit %arg%
echo %arg%

Now the problem with this is that the path and the file names can have spaces in them, which means each of them should in the command be surrounded by quotation marks. In bash iirc you can achieve that by using a combination of single quotes and double quotes in the script, but single quotes don't seem to do anything in batch. How do I get each argument separately properly surrounded by quotation marks?

Also incidentally, is there a way to make set /p recognize an empty string as an input? Because in the above example, if I remove the "set line=" command, the loop doesn't exit even on empty input because the set /p (first line of the loop) doesn't seem to do anything if it receives empty input.
2015 Feb 12 at 17:02 UTC
The best cure for ___ is a large ___.

Am I doing it right?
2014 Nov 2 at 20:38 UTC
I'm guessing you two pulled one of these.
2014 Nov 2 at 14:04 UTC
If those were potatoes, we have some weirdly shaped and coloured potatoes here.