Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Batch delete first and last charact
Name: p1ng Date: June 12, 2008 at 10:31:53 Pacific OS: XP CPU/Ram: 256 Product: Gateway
Comment:
I need something to delete the first and last character on the first 3 lines. The character is a "
EX: My program creates a text file that looks like: "This is the first line" "this is the second line" "this is the thrid line" I'm just asking for something that could remove the Quotes. Thanks
Name: Mechanix2Go Date: June 12, 2008 at 11:02:12 Pacific
Reply:
@echo off > newfile setLocal EnableDelayedExpansion
for /f "tokens=* delims= " %%a in (myfile) do ( set /a N+=1 if !N! gtr 3 ( echo %%a >> newfile ) else ( set str=%%a set str=!str:"=! echo !str! >> newfile ) )
===================================== If at first you don't succeed, you're about average.
M2
0
Response Number 2
Name: p1ng Date: June 12, 2008 at 14:06:20 Pacific
Reply:
Thanks Mechanix2Go! I just had to alter my script to make a temp file so your script could make the final page needed. Worked great. I was wondering if you want me to include you in the making of the program or not.
0
Response Number 3
Name: Mechanix2Go Date: June 12, 2008 at 17:25:35 Pacific
Reply:
Sure, why not.
===================================== If at first you don't succeed, you're about average.
Summary: Can anyone help come up with a solution. I'm trying to simply parse the quotes from strings read in from a file. Each string starts and ends with a quote ("). I just want to drop the first and last ...
Summary: Hi, i need help. i need a hint or example to get the last number /and last two numbers. Problem: sum of first and last number in a c++ rogram. product of last two numbers. how can i get the last numb...