Win98banter

Win98banter (http://www.win98banter.com/index.php)
-   Shell (http://www.win98banter.com/forumdisplay.php?f=15)
-   -   Suppress End of line character in batch filese (http://www.win98banter.com/showthread.php?t=33668)

gbruen January 24th 06 02:33 PM

Suppress End of line character in batch filese
 
The reference was my site:
http://home.att.net/~gobruen/progs/d...ch.html#lbreak

I didn't have it up at the time, but Stephen's question got me to dig it up.





"Jeff Richards" wrote in message
...
Nice Find. Do you have a reference?

FWIW my preference would be to build those strings into variables (as

you've
already done for some) and reference the variables from the backup command
line.
--
Jeff Richards
MS MVP (Windows - Shell/User)
"Stephen Ford" . wrote in message
...
Have just found this - use the "^" character at the end of a line with a
leading space on the next line, so ...

ntbackup backup "@E:\Backup bks files\Backup-%NAME%-Data.bks" /F
"E:\Backup bkf files\Backup-%NAME%-Data-%TYPE%.bkf" /j "%NAME% %LNGTYPE%
Data Backup" /l:s /m %LNGTYPE% /n "%NAME%D" /v:yes

... becomes ...

ntbackup backup "@E:\Backup bks files\Backup-%NAME%-Data.bks" ^
/F "E:\Backup bkf files\Backup-%NAME%-Data-%TYPE%.bkf" ^
/j "%NAME% %LNGTYPE% Data Backup" ^
/l:s ^
/m %LNGTYPE% ^
/n "%NAME%D" ^
/v:yes

--
Regards
Stephen Ford

"Jeff Richards" wrote in message
...
Your editor might support a newline character which is ignored by the
command interpreter, depending on what editor you are using.
--
Jeff Richards
MS MVP (Windows - Shell/User)
"Stephen Ford" . wrote in message
...
OK, Thanks. I'd swear I've used such a character to make the code more
readable. Must be thinking of something else.









Jeff Richards January 24th 06 07:44 PM

Suppress End of line character in batch filese
 
Do you know if it's exclusive to CMD.EXE? I can't get it to work in DOS.
--
Jeff Richards
MS MVP (Windows - Shell/User)
"gbruen" wrote in message
...
The reference was my site:
http://home.att.net/~gobruen/progs/d...ch.html#lbreak

I didn't have it up at the time, but Stephen's question got me to dig it
up.




gbruen January 25th 06 12:20 AM

Suppress End of line character in batch filese
 
It should work. I just tried it loading the COMMAND shell rather than the
CMD shell.

What kind of error or response are you getting?


"Jeff Richards" wrote in message
...
Do you know if it's exclusive to CMD.EXE? I can't get it to work in DOS.
--
Jeff Richards
MS MVP (Windows - Shell/User)
"gbruen" wrote in message
...
The reference was my site:
http://home.att.net/~gobruen/progs/d...ch.html#lbreak

I didn't have it up at the time, but Stephen's question got me to dig it
up.






Jeff Richards January 25th 06 08:27 AM

Suppress End of line character in batch filese
 
The CLI tries to process the first line, errors, and then processes the
second line and errors again.

A sample file works fine in 5.1.2600 but fails in 4.10.2222 and 5.00.500.
It's an XP thing.
--
Jeff Richards
MS MVP (Windows - Shell/User)
"gbruen" wrote in message
...
It should work. I just tried it loading the COMMAND shell rather than the
CMD shell.

What kind of error or response are you getting?




gbruen January 25th 06 06:02 PM

Suppress End of line character in batch filese
 
I hate XP

"Jeff Richards" wrote in message
...
The CLI tries to process the first line, errors, and then processes the
second line and errors again.

A sample file works fine in 5.1.2600 but fails in 4.10.2222 and 5.00.500.
It's an XP thing.
--
Jeff Richards
MS MVP (Windows - Shell/User)
"gbruen" wrote in message
...
It should work. I just tried it loading the COMMAND shell rather than

the
CMD shell.

What kind of error or response are you getting?






Stephen Ford January 26th 06 08:20 AM

Suppress End of line character in batch filese
 
This is a Win98 group.
Yes. I drifted :-}
The logic in posting the group was this:
Was going to do this on my 98 PC, but then had to transfer onto my xp PC;
No response from the XP general group;
No XP dos group;
At the level I work, it's fairly true that dos98 = dosxp;
The dos98 correspondants have always been helpful.

Conclusion - no harm done if I try to get some help off the dos98 group.

Of course I shouldn't have mentioned xp ... never was any good at lying ...

So in truth, this is a sort of general dos question, the solution to which I
would equally apply to Win98 dos as to any other Win dos.

--
Regards
Stephen Ford

"Franc Zabkar" wrote in message
...
On Mon, 23 Jan 2006 09:05:47 -0000, "Stephen Ford"
put finger to keyboard and
composed:

Not sure what the version number refers to that you quote. I'm running
what
ever cmd.exe comes with Win XP Pro SP2.


This is a Win98 group.

- Franc Zabkar
--
Please remove one 'i' from my address when replying by email.




Jeff Richards January 26th 06 10:48 AM

Suppress End of line character in batch filese
 
There's no harm asking about DOS in a W98 group, but the answers you get may
not apply to COMMAND or CMD running in XP (as turned out to be the case for
your question). So this group might be your best source for answers about
DOS, but you will have to take the answers with a grain of salt when it
comes to using them under XP command interpreters.

But you have provoked some investigation and discovery, and a new www
reference for the topic.
--
Jeff Richards
MS MVP (Windows - Shell/User)
"Stephen Ford" wrote in message
...
This is a Win98 group.

Yes. I drifted :-}
The logic in posting the group was this:
Was going to do this on my 98 PC, but then had to transfer onto my xp PC;
No response from the XP general group;
No XP dos group;
At the level I work, it's fairly true that dos98 = dosxp;
The dos98 correspondants have always been helpful.

Conclusion - no harm done if I try to get some help off the dos98 group.

Of course I shouldn't have mentioned xp ... never was any good at lying
...

So in truth, this is a sort of general dos question, the solution to which
I would equally apply to Win98 dos as to any other Win dos.




gbruen January 26th 06 06:33 PM

Suppress End of line character in batch filese
 
I just tried it on an XP machine, ver 5.1.2600 and it worked. I wonder why
the drop in 4.1 and 5.0?




"Jeff Richards" wrote in message
...
The CLI tries to process the first line, errors, and then processes the
second line and errors again.

A sample file works fine in 5.1.2600 but fails in 4.10.2222 and 5.00.500.
It's an XP thing.
--
Jeff Richards
MS MVP (Windows - Shell/User)
"gbruen" wrote in message
...
It should work. I just tried it loading the COMMAND shell rather than

the
CMD shell.

What kind of error or response are you getting?







All times are GMT +1. The time now is 05:23 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Win98Banter.com