Subject: How To rename and delete from file
Posted By: shivanshub Post Date: 8/11/2006 1:32:32 PM
Hi pls help me. I want to rename folder/file in framework 1.1 but with out making any copy or temp file of original.   


And other prob is I need to delete data from file and after that resize my file but with out making any copy (temp) of original file. Or by just using small size temp file but not to copy whole file.


Pls help by either by logical idea or by any built in class.

Thanking u.


Reply By: DARSIN Reply Date: 8/18/2006 5:47:49 AM

1) U can use File.Move();


2)Just Try to read all lines by
String[] str = File.ReadAllLines("C:\test.txt");

String[] newStr;
str.CopyTo(newStr,10);

Then write the desired no of lines in the file again by
File.WriteAllLines("C:\test.txt",newStr);

i havent complied this..Pls check




Reply By: shivanshub Reply Date: 8/18/2006 11:53:55 AM
Thanks for ur Time dear. But pls see this prob and what i want at
my prob is diff then just read and write in file.  

 http://p2p.wrox.com/topic.asp?TOPIC_ID=48291

B.Tech(Computer Science) final year  from Chandigarh,INDIA

Go to topic 48512

Return to index page 200
Return to index page 199
Return to index page 198
Return to index page 197
Return to index page 196
Return to index page 195
Return to index page 194
Return to index page 193
Return to index page 192
Return to index page 191