Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 11th, 2006, 01:32 PM
Authorized User
 
Join Date: Aug 2006
Location: Chandigarh, Chandigarh, India.
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.
Reply With Quote
  #2 (permalink)  
Old August 18th, 2006, 05:47 AM
Friend of Wrox
 
Join Date: Sep 2004
Location: , , India.
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




Reply With Quote
  #3 (permalink)  
Old August 18th, 2006, 11:53 AM
Authorized User
 
Join Date: Aug 2006
Location: Chandigarh, Chandigarh, India.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:30 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.