Page 1 of 1

About For file

Posted: 31 May 2011 04:07
by Ed Dyreen
I was just wondering, we can do
for /f %%! in (file) do
for /f "useback tokens=*" %%! in (
'type file'
) do

But we can't do
for /f %%! in ( "C:\windows\win ooooows" ) do

for does not allow a file between quotes, is there a solution :?:

Re: About For file

Posted: 31 May 2011 04:35
by Cleptography
You can't do that batch for doesn't know how to process files, they are bad mojo they don't work.
For sees a file and says forget that I don't want to. Quotes who knows what the hell those are for you bastard.
Stop talking to yourself it makes you look crazy.

Re: About For file

Posted: 31 May 2011 04:39
by Ed Dyreen
Stop talking to yourself it makes you look crazy.


It was ment as a question :|

Re: About For file

Posted: 31 May 2011 05:06
by Cleptography
Why do you ask questions to which you already know the answers to?

Re: About For file

Posted: 31 May 2011 05:15
by Ed Dyreen
i don't :|
I really wish i could do this with for

for /f %%! in ( File Name.ext ) do

but it does File &Name.ext instead of just looking for 'File Name.ext'

Re: About For file

Posted: 31 May 2011 05:26
by Ed Dyreen
Why do you ask questions to which you already know the answers to?

Look who's talking :evil:

Re: About For file

Posted: 31 May 2011 05:29
by Cleptography
I don't anything about batch
Why we can't
for /f %%! in ( "C:\windows\win ooooows" ) do
but we can for /f "useback tokens=*" %%! in ("c:\windows\blow up this box\billy madison.txt")
Someone will surely have the right answer.
It makes no sense to me either.

Re: About For file

Posted: 31 May 2011 05:39
by Ed Dyreen
:idea: IT WORKS !!!

for /f "useback tokens=*" %%! in ( "TST.TXT" ) do echo.%%!

I knew it, I forgot it, now I remember thanx to u.

That's not what the help says though

Code: Select all

FOR /F ["opties"] %variable IN (bestandsset) DO opdracht [opdrachtparameters]
FOR /F ["opties"] %variable IN ('tekenreeks') DO opdracht [opdrachtparam.]
FOR /F ["opties"] %variable IN (`opdracht`) DO opdracht [opdrachtparameters]

Re: About For file

Posted: 31 May 2011 05:42
by Cleptography
Clever had to fix something someone broke.
The help is right the program is wrong :wink:
All fixed now. :mrgreen:

Re: About For file

Posted: 31 May 2011 11:51
by orange_batch
Blah blah blah guys. lol Yes,

Code: Select all

for /f "usebackq" %%x in ("my file path") do ...