The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: [OT] - CMD Scripting Help



Glenn,

You're a hero and a gent!

Many Thanks
Don


On 15 Sep 2005, at 13:13, Sullivan, Glenn wrote:

> 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
>
>
> ------------------------ Yahoo! Groups Sponsor --------------------
> ~-->
> Drugs Don't Discriminate. Get help for yourself or someone you know.
> http://us.click.yahoo.com/ncM4OD/ZbOLAA/a8ILAA/IBOolB/TM
> --------------------------------------------------------------------
> ~->
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor --------------------
> ~-->
> Help tsunami villages rebuild at GlobalGiving. The real work starts
> now.
> http://us.click.yahoo.com/EHTnjD/KbOLAA/a8ILAA/IBOolB/TM
> --------------------------------------------------------------------
> ~->
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>




UKHA_D Main Index | UKHA_D Thread Index | UKHA_D Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.