Users Pricing

forum

Home Forums C# Change current FileInfo file? – MindStick

C# Change current FileInfo file?

Royce Roy 3271 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.

1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md