Wrox Programmer Forums
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 11th, 2006, 01:32 PM
Authorized User
 
Join Date: Aug 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to shivanshub
Default How To rename and delete from file

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.


__________________
I am not like every body else.
 
Old August 18th, 2006, 05:47 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default


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




 
Old August 18th, 2006, 11:53 AM
Authorized User
 
Join Date: Aug 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to shivanshub
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to delete file System.IO.Delete error maricar C# 13 March 14th, 2014 06:50 AM
Rename File/Folder shivanshub C# 17 August 19th, 2006 09:48 AM
Rename File/Folder shivanshub General .NET 0 August 11th, 2006 01:57 PM
Rename file without time change surendran PHP How-To 1 July 26th, 2006 05:38 AM
Rename multiple file upload in sequential order flyguylol PHP How-To 0 January 11th, 2006 06:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.