473,385 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Delete Text from Text Files

Hi ...
I have text file contain such data
1111222233334444
i need delete particlar char without load all data into memory
says
delete 1st-5th char ..then the data in text file
should 222233334444.
I am not sure how to acheive it

PS.This application will run on Pocket Pc 2003

Thanks
Percy
Nov 20 '05 #1
6 2361
Cor
Hi Percy,

Where is the data of the text file located?

Cor
I have text file contain such data
1111222233334444
i need delete particlar char without load all data into memory
says
delete 1st-5th char ..then the data in text file
should 222233334444.
I am not sure how to acheive it

PS.This application will run on Pocket Pc 2003

Nov 20 '05 #2
* "=?Utf-8?B?UGVyY3kgTkc=?=" <pe******@hotmail.com> scripsit:
I have text file contain such data
1111222233334444
i need delete particlar char without load all data into memory
says
delete 1st-5th char ..then the data in text file
should 222233334444.
I am not sure how to acheive it


You will have to completely rewrite the file (shift its contents to left
and then set the file's length using 'FileStream.SetLength'. Have a
look at the classes in the 'System.IO' namespace and make sure the
classes/methods you use are supported in the .NET Compact Framework.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
The text file is located at Pocket PC
"Cor" <no*@non.com> wrote in message
news:uB**************@TK2MSFTNGP12.phx.gbl...
Hi Percy,

Where is the data of the text file located?

Cor
I have text file contain such data
1111222233334444
i need delete particlar char without load all data into memory
says
delete 1st-5th char ..then the data in text file
should 222233334444.
I am not sure how to acheive it

PS.This application will run on Pocket Pc 2003


Nov 20 '05 #4
Cor
On the back or the front side?
The text file is located at Pocket PC

Where is the data of the text file located?
I have text file contain such data
1111222233334444
i need delete particlar char without load all data into memory
says
delete 1st-5th char ..then the data in text file
should 222233334444.
I am not sure how to acheive it

PS.This application will run on Pocket Pc 2003

Nov 20 '05 #5
Cor
Hi Percy,

When I ask where it is located than it is important to know if it is in a
database of a flat textfile on disk.

If it is in a database you have only to read the items in memory from the
text, if it is in a standard textfile you have to read all the rows from
the file in a streaming way and change the text in memory.

That is one of the most important reason that people are using databases
otherwise the could maybe better use textfiles.

However, maybe is there a special type randomreadable textfile on a
pocketPC, but than I think that for that you can better ask this question
in a pocketPc newsgroup.

Cor
Nov 20 '05 #6
It is in the front end.
The data is stored in textfile, not database due to some technical issues.

Thanks
Percy
"Cor" <no*@non.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi Percy,

When I ask where it is located than it is important to know if it is in a
database of a flat textfile on disk.

If it is in a database you have only to read the items in memory from the
text, if it is in a standard textfile you have to read all the rows from
the file in a streaming way and change the text in memory.

That is one of the most important reason that people are using databases
otherwise the could maybe better use textfiles.

However, maybe is there a special type randomreadable textfile on a
pocketPC, but than I think that for that you can better ask this question
in a pocketPc newsgroup.

Cor

Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Darren | last post by:
When I do a final build I typically build all projects in debug mode first and then release mode and then copy all files to a builds folder. However I've noticed that the .pdb files in the debug...
5
by: ad | last post by:
I want to delete some text which begin with <!DOCTYPE and end with > in a file. How can I do it?
2
by: David Hearn | last post by:
I am using some temporary text files and xml files to store some data in during a users session. When their session ends (they leave the site or their session times out) I need to delete these...
1
by: Suresh Tri | last post by:
Hi, I was trying to overload concat operator ||(text,text) such a way that it behaves like Oracle. i.e. I want 'abc' || null to return 'abc' instead of null. I know that it is not the expected ...
2
by: Johann Robette | last post by:
Hi, I'm trying to call the array_to_string function like this : SELECT array_to_string(array, '~^~') --> it comes directly from the doc. I get this error msg : ERROR: parser: parse error at...
4
by: David Garamond | last post by:
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do...
2
by: hzgt9b | last post by:
Using VB .NET 2003, I need to delete some read-only files. I tried using System.IO.File.Delete(filename) - but when the files are read-only, I get error messages stating that I don't have proper...
4
vninja
by: vninja | last post by:
Hi, i'm totally lost. Im trying to create a program that reads a file and then changes some text in the file. i've got a couple approaches to this problem but i cannot find the resources nessesary...
1
by: newfresher | last post by:
Hi, I want to write a shell script which ll access the folder, open it and read the series of text/sql files their one after another, in it. After reading one text/sql file, commands their in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.