Search found 61 matches

by shadeclan
02 Nov 2011 07:44
Forum: DOS Batch Forum
Topic: Full Path in For Loop
Replies: 10
Views: 3327

Re: Full Path in For Loop

That is why the "USEBACKQ" option support was added to FOR /F. Use HELP FOR to see all the ways USEBACKQ impacts FOR /F behavior. for /f "usebackq tokens=1-8,*" %%a in ("C:\Program Files\My Apps\IDDTextDirectory\iDD.txt") do ( @echo.%%i ) Dave Benham BING! Knew it was ...
by shadeclan
02 Nov 2011 06:55
Forum: DOS Batch Forum
Topic: Full Path in For Loop
Replies: 10
Views: 3327

Full Path in For Loop

Is there a way to use the full path in a FOR loop? For example, the following code works if the current directory is where the file resides: cd /d "C:\Program Files\My Apps\IDDTextDirectory" for /f "tokens=1-8,*" %%a in (iDD.txt) do ( @echo.%%i ) However, I don't seem to be able ...
by shadeclan
31 Oct 2011 06:52
Forum: DOS Batch Forum
Topic: Colon Philosophy
Replies: 17
Views: 7456

Re: Colon Philosophy

Well, actually it's very simple. The syntax is GOTO label except of GOTO :EOF . That's what you can find in the documentation. If GOTO :label works then a programmer will call it "undefined behavior". You can't demand functioning. Regards aGerman Actually, I can demand anything I want. Wh...
by shadeclan
28 Oct 2011 13:54
Forum: DOS Batch Forum
Topic: Colon Philosophy
Replies: 17
Views: 7456

Re: Colon Philosophy

:eof is no label. It's only a virtual expression which tells the parser to jump to the e nd o f f ile. For that reason only for goto :eof needs the colon. Regards aGerman True but when you think "goto" you think "label". Also, according to the WinXP Batch help file: If command e...
by shadeclan
28 Oct 2011 12:11
Forum: DOS Batch Forum
Topic: Colon Philosophy
Replies: 17
Views: 7456

Re: Colon Philosophy

Here's a thought. Since in the command "goto:eof" the colon is required, wouldn't it be a good idea to always use the colon for other labels so that, if you are a sieve-mind like myself, you don't forget it when coding "goto:eof"? http://www.showbizpizza.com/events/10th/rap/rae/c...
by shadeclan
26 Oct 2011 06:40
Forum: DOS Batch Forum
Topic: Colon Philosophy
Replies: 17
Views: 7456

Re: Colon Philosophy

(original post deleted) Never mind - I was not distinguishing between GOTO LABEL vs. CALL LABEL. Since GOTO LABEL without the colon works, I just assumed CALL LABEL works as well. Well it doesn't. Dave Benham Yup. Just for giggles, I tried calling a label in a batch job from a different batch job, ...
by shadeclan
17 Oct 2011 13:25
Forum: DOS Batch Forum
Topic: Colon Philosophy
Replies: 17
Views: 7456

Re: Colon Philosophy

http://www.youtube.com/watch?v=mWeh3_ITG7M 27 tutorials, and hopefully a 28th eventually, they break down all of what I know into the simplest of terms. Nice. Thanks - I'm saving the link. Assembly appears to be a dying skill but I have great respect for those who take the time to learn and use it.
by shadeclan
17 Oct 2011 12:29
Forum: DOS Batch Forum
Topic: Getting Results From VBScript
Replies: 4
Views: 4646

Re: Getting Results From VBScript

Well, the following code (in a round-about manner) provides me with what I need in spite of the WScript.Quit function not providing me a proper return code for whatever reason: @echo off setlocal set "vMsgBx=msgbox.vbs" set "vRsltTxt=Results.txt" set "vRslt=vRslt" @echo...
by shadeclan
17 Oct 2011 06:29
Forum: DOS Batch Forum
Topic: Colon Philosophy
Replies: 17
Views: 7456

Re: Colon Philosophy

nitt wrote:-_- Is Assembly really the only one you noticed? Did you miss the C++ and Batch example?

Actually, I noticed, although I am ignorant of any C language :( and don't know assembly :cry:.

Assembly has always fascinated me but I have never had the time to learn.
by shadeclan
14 Oct 2011 13:29
Forum: DOS Batch Forum
Topic: Getting Results From VBScript
Replies: 4
Views: 4646

Re: Getting Results From VBScript

Both scripts are working for me and actually I have no clue why they won't work for you. Regards aGerman There must be something wrong with my computer. In an attempt at an alternate route, I decided to try creating a file from which I could read a result: Dim objFS Dim objOut Set objFS = CreateObj...
by shadeclan
14 Oct 2011 12:59
Forum: DOS Batch Forum
Topic: Getting Results From VBScript
Replies: 4
Views: 4646

Getting Results From VBScript

I'm not exactly sure what I'm doing wrong here. Per an individual who provided a great answer to a related question, I wrote the following batch file: @echo off setlocal set msgbox="msgbox.vbs" @echo:wscript.quit(msgbox(wscript.arguments(0),wscript.arguments(1),wscript.arguments(2))) > %ms...
by shadeclan
14 Oct 2011 11:38
Forum: DOS Batch Forum
Topic: Colon Philosophy
Replies: 17
Views: 7456

Re: Colon Philosophy

I was wondering when you'd show up!


Ed Dyreen wrote:now I am confused myself, there was a difference ...

Well, think about it and let me know.
by shadeclan
14 Oct 2011 08:35
Forum: DOS Batch Forum
Topic: Colon Philosophy
Replies: 17
Views: 7456

Re: Colon Philosophy

No, I'm not talking about the one connected to your anus, moron! That wasn't that funny... Forgive the potty humor - I was trying to cut folks off "at the pass" as we say here in the US. until you do not use an editor with code coloring I, myself, use PSPad for batch editing. It does a pr...
by shadeclan
13 Oct 2011 13:08
Forum: DOS Batch Forum
Topic: Colon Philosophy
Replies: 17
Views: 7456

Colon Philosophy

No, I'm not talking about the one connected to your anus, moron! In goto statements, it seems that colons are almost always optional. For example: goto:SomeLabel ... seems just as valid as ... goto SomeLabel Only in cases of the implicit label EOF is it required: goto:EOF My question is this - is th...
by shadeclan
30 Jun 2011 06:54
Forum: DOS Batch Forum
Topic: Quick Syntax Question
Replies: 11
Views: 3643

Re: Quick Syntax Question

☺ With character I mean ANY character , this won't work : @echo off goto :skip echo.ooops !:skip Are u smoking a joint ? echo.Yes, am I allowed ? goto :skip echo.ooops &&& >>> &:skip Are u smoking a joint ? echo.Yes, am I allowed ? goto :skip echo.ooops <<w<ghj|:skip Well, since it'...