[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
RE: [OT] - CMD Scripting Help
- Subject: RE: [OT] - CMD Scripting Help
- From: "Sullivan, Glenn" <gsullivan@xxxxxxxxxxxxxx>
- Date: Thu, 15 Sep 2005 08:13:05 -0400
Here you go:
for /f "tokens=*" %%i in (file.txt) do call :noquotes %%i
pause
goto eof
:NoQuotes
rem %1 = Current Filename
SET @Line=%~1
echo %@Line% >>NewFile.txt
GOTO :EOF
:EOF
This will read "file.txt" and create "NewFile.txt",
stripping the quotes
from the beginning and end of each line.
Glenn Sullivan, MCSE+I MCDBA
David Clark Company Inc.
-----Original Message-----
From: ukha_d@xxxxxxx [mailto:ukha_d@xxxxxxx] On Behalf
Of MacNewbie
Sent: Thursday, September 15, 2005 7:41 AM
To: ukha_d@xxxxxxx
Subject: [ukha_d] [OT] - CMD Scripting Help
Ok, so while the list is quiet can anyone point me in the right
direction to accomplish this?
I've got a straightforward text file on a Windows 2000 server box
containing a line
"This is a line of text"
How do I process the file using a CMD file (and whatever internal
commands are available in Windows 2000) to strip out the leading and
trailing quotation marks and just leave the text? They'll probably only
be the single line of text in the file.
I'm sure there's a really easy way to do it but I haven't figured it out
yet!
Any help greatfully received.
Cheers
Don
UKHA_D Main Index |
UKHA_D Thread Index |
UKHA_D Home |
Archives Home
|