forum

Home / DeveloperSection / Forums / C# Change current FileInfo file?

C# Change current FileInfo file?

Royce Roy 2700 18-Dec-2013

I'd like to change the file that the FileInfo object is currently using. Let say I want to loop through 1000 files.

FileInfo myFile = new FileInfo("myfile.txt");
myFile.ChangeFile("myfile2.txt");                   
How can I do this? Was hoping for .FileName =, but it's readonly.

c# c# 
Updated on 18-Dec-2013

Can you answer this question?


Answer

1 Answers

Liked By