G
Guest
Guest
Archived from groups: microsoft.public.win2000.general (More info?)
Hello,
(1) I have created a batch file "test.bat" which takes a parameter from
command line and writes it to a file. The Batch has just one command which
is mentioned below.
echo %1 >>Test.txt
(2) The problem is that the input paramater can be a string which can have
both spaces and quotes within it.
Problem arrises with command line strings which have BOTH quotes and spaces
a) A Space can be handled by surrounding Quotes
> test.bat "TESTSPACE ONLY"
b) When a String contains a Quote
>test.bat "TESTQUOTE" ONLY"
There is an error in the above command
c) When there is a String and Quote both
>test.bat "TESTQUOTE" And Space"
It only takes the part TestQuote
The escape chatacter ^ also does not work over here
My operating system is Windows Professional. Is it possible to accept
strings which may contains both quotes and spaces as paramateres??
Regards,
Maansi
Hello,
(1) I have created a batch file "test.bat" which takes a parameter from
command line and writes it to a file. The Batch has just one command which
is mentioned below.
echo %1 >>Test.txt
(2) The problem is that the input paramater can be a string which can have
both spaces and quotes within it.
Problem arrises with command line strings which have BOTH quotes and spaces
a) A Space can be handled by surrounding Quotes
> test.bat "TESTSPACE ONLY"
b) When a String contains a Quote
>test.bat "TESTQUOTE" ONLY"
There is an error in the above command
c) When there is a String and Quote both
>test.bat "TESTQUOTE" And Space"
It only takes the part TestQuote
The escape chatacter ^ also does not work over here
My operating system is Windows Professional. Is it possible to accept
strings which may contains both quotes and spaces as paramateres??
Regards,
Maansi