Computing.Net > Forums > Programming > echo output help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

echo output help

Reply to Message Icon

Name: temp_usr
Date: October 2, 2009 at 23:58:50 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

i need some help with my echo >> output
i need to output this line and save it as another batch file

ECHO for /f "tokens=2 delims=," %%a in (1.csv) do >> 2.csv echo %%a

but i cannot do this

ECHO for /f "tokens=2 delims=," %%a in (1.csv) do >> 2.csv echo %%a >> batchfile.bat

as it will recognize the first set of >> as output



Sponsored Link
Ads by Google

Response Number 1
Name: Judago
Date: October 3, 2009 at 00:08:01 Pacific
Reply:

^ escapes most characters, You will also need to double all %'s.
If inside a code block you may also need to escape the
brackets.

It is also good practice to redirect before the command to
avoid trailing spaces or conflict with destination redirection
(ie 2>nul to discard stderr).

>> batchfile.bat ECHO for /f "tokens=2 delims=," %%%%a in (1.csv) do ^>^> 2.csv echo %%%%a


Batch Variable how to


0

Response Number 2
Name: temp_usr
Date: October 3, 2009 at 00:13:02 Pacific
Reply:

thanx again judago thats twice in a day! works like a charm!!!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Batch to insert column fr... what is clipboard in c la...


Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: echo output help

Batch Helpfile Mash www.computing.net/answers/programming/batch-helpfile-mash/15403.html

SQL output help! www.computing.net/answers/programming/sql-output-help/11844.html

Batch environmental var help www.computing.net/answers/programming/batch-environmental-var-help/15195.html