for /f More ?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

for /f More ?

#1 Post by Ed Dyreen » 05 Jun 2011 21:39

Check this out:

Code: Select all

C:\PROFSYS\ADMIN>for /f
Meer?
De syntaxis van de opdracht is onjuist.

C:\PROFSYS\ADMIN>

Explain that !


More ?, More what Mr. DOS :?:

Cleptography
Posts: 287
Joined: 16 Mar 2011 19:17
Location: scriptingpros.com
Contact:

Re: for /f More ?

#2 Post by Cleptography » 05 Jun 2011 21:44

You silly ass it's more command like continue on with "tokens=Whers Waldo" :P
Correction I am wrong as usual that doesn't work. :mrgreen:

Code: Select all

c:\>for /f
More? ^^^
More? %%%%%^^^
More?
More?
^%%%%^
Last edited by Cleptography on 05 Jun 2011 21:52, edited 1 time in total.

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: for /f More ?

#3 Post by Ed Dyreen » 05 Jun 2011 21:51

@Cleptography Why are u teasing me ? I'm trying to get a serious response here get your *** of my thread !
more command like continue on with "tokens

Not logical ! I still don't understand it. Please @Cleptography I am not kidding !

Code: Select all

c:\>for /f
More? ^^^
More? %%%%%^^^
More?
More?
^%%%%^

What is going on !, You've confused me even more now thanks :!:

I am just wondering, why does for /f <ENTER> causes dos to ask me more ? More what :?:

This I would understand:

Code: Select all

for /f^
%%a in.........

because of the line continuation, but I didn't line continue ?!
Last edited by Ed Dyreen on 06 Jun 2011 01:50, edited 1 time in total.

Cleptography
Posts: 287
Joined: 16 Mar 2011 19:17
Location: scriptingpros.com
Contact:

Re: for /f More ?

#4 Post by Cleptography » 05 Jun 2011 21:59

I am actually curious to an answer to this as well. I will be serious.
Sorry :oops:

Work:

Code: Select all

for /f
for /r


Does not work:

Code: Select all

for /d

Cleptography
Posts: 287
Joined: 16 Mar 2011 19:17
Location: scriptingpros.com
Contact:

Re: for /f More ?

#5 Post by Cleptography » 05 Jun 2011 22:07

Ok I see what is going on here, as expected the command is asking for more input try this.

Code: Select all

c:\>for /f
More?  ^%a in ("str") do @echo.%a
str

Add a space at the more line then the ^ followed by the rest of the command.
This continues processing. The space before ^%a represents the space that would happen if we for /f %a
I am still puzzled as to why for /d does not respond the same way. :?:

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: for /f More ?

#6 Post by Ed Dyreen » 05 Jun 2011 22:21

I get it, I really ain't used using the terminal directly, but now it all makes sense.

Post Reply