PC Review


Reply
Thread Tools Rate Thread

Breaking Long Lines in Batch

 
 
moleskyca1@yahoo.com
Guest
Posts: n/a
 
      16th Jul 2007
I have long lines in my .bat file. This works, but it is diffucult to
read. How can I break them into multiple line, like:

set "RUNTIME_ENV=-param1=sql4,new_12rts -param2=sql5,new_12rts -
param3=sql5,new_12rts -param6=orcl_enum12 -param7=orcl_enumA17 -
param8=.\src\extern\lib\oswindowsnt"

Line is longer. Is there something like in makefile when you do '\'
and then tab the next line?

Thank you.

 
Reply With Quote
 
 
 
 
Matthias Tacke
Guest
Posts: n/a
 
      16th Jul 2007
(E-Mail Removed) wrote:
> I have long lines in my .bat file. This works, but it is diffucult to
> read. How can I break them into multiple line, like:
>
> set "RUNTIME_ENV=-param1=sql4,new_12rts -param2=sql5,new_12rts -
> param3=sql5,new_12rts -param6=orcl_enum12 -param7=orcl_enumA17 -
> param8=.\src\extern\lib\oswindowsnt"
>
> Line is longer. Is there something like in makefile when you do '\'
> and then tab the next line?
>

The group alt.msdos.batch is dedicated to DOS/Win9x/WinME and these OS'
don't support enhancements present in NT/W2K/XP/..

Please crosspost only when really neccessary and include a follow up then.
This question could be easily googled by searching for "line continuation
char".

Assuming you are looking for a solution for the nt-line, this will do (but
only without the quoting you used):

set RUNTIME_ENV=-param1=sql4,new_12rts^
-param2=sql5,new_12rts^
-param3=sql5,new_12rts^
-param6=orcl_enum12^
-param7=orcl_enumA17^
-param8=.\src\extern\lib\oswindowsnt
echo %RUNTIME_ENV%


Xpost and f'up2 alt.msdos.batch.nt

--
Greetings
Matthias
 
Reply With Quote
 
foxidrive
Guest
Posts: n/a
 
      16th Jul 2007
On Mon, 16 Jul 2007 07:54:43 -0700, (E-Mail Removed) wrote:

>I have long lines in my .bat file. This works, but it is diffucult to
>read. How can I break them into multiple line, like:
>
>set "RUNTIME_ENV=-param1=sql4,new_12rts -param2=sql5,new_12rts -
>param3=sql5,new_12rts -param6=orcl_enum12 -param7=orcl_enumA17 -
>param8=.\src\extern\lib\oswindowsnt"
>
>Line is longer. Is there something like in makefile when you do '\'
>and then tab the next line?
>
>Thank you.


Try this: enclosing the term in quotes breaks the line ending character ^

@echo off
set RUNTIME_ENV=-param1=sql4,new_12rts -param2=sql5,new_12rts ^
param3=sql5,new_12rts -param6=orcl_enum12 -param7=orcl_enumA17 ^
param8=.\src\extern\lib\oswindowsnt

echo %RUNTIME_ENV%


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Building long string variables: breaking new lines vavroom@gmail.com Microsoft Access 1 16th Feb 2006 03:45 AM
Breaking Lines Into Pieces BR Microsoft Access 3 18th Nov 2004 09:16 PM
Breaking up long documents MICKEYW Microsoft Word Document Management 1 27th May 2004 05:57 AM
breaking lines sophie Microsoft Windows 2000 Deployment 1 14th Jan 2004 03:52 PM
batch file; prevent usres from breaking JIM.H. Microsoft Windows 2000 CMD Promt 5 17th Dec 2003 10:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:09 PM.