Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to separate a long command to two lines  (Read 3930 times)

0 Members and 1 Guest are viewing this topic.

ssg

  • Guest
How to separate a long command to two lines
« on: August 13, 2004, 03:36:09 PM »
Hi,

I have a very long command in a batch file, but I don't want to type it in one line. How can I separate it as two lines but still get executed as one command?

Thanks,
sg  :-/

2k dummy

  • Guest
Re: How to separate a long command to two lines
« Reply #1 on: August 13, 2004, 04:20:41 PM »
Use <ctrl+j> (hold down the ctrl key and press j) at the point where you want to line to break. Then continue typing the command where you left off. This tells DOS that what follows on the next line is part of the same command. If type the command in a DOS window, you will see that the cursor returns to the home position, but without the normal prompt.

lexiskm

  • Guest
Re: How to separate a long command to two lines
« Reply #2 on: August 16, 2004, 07:59:47 AM »
I am using Windows XP Pro and I was not able to make the ctrl+j work.  Is there a anternative method for entering long command lines?  What is the maximum length of a command line?

Thanks in advance.

ssg

  • Guest
Re: How to separate a long command to two lines
« Reply #3 on: August 16, 2004, 08:56:38 AM »
Hi,

It seems <Ctrl + j> doesn't work. The second line is always executed as another command. Please note this is not a dos command.

Thanks.

MalikTous

  • Guest
Re: How to separate a long command to two lines
« Reply #4 on: August 16, 2004, 06:17:21 PM »
The command line maximum length is a little short of 256 characters, including the prompt, and if you just type in your string it should automatically line feed when you reach the end of the 80 character line. You should be able to fill 3 lines with text (240 characters) before DOS truncates the string when you push ENTER.

CTRL J is not a valid character in a batch string.