VB.NET: Create Countered File

Many a times, I struggled to find a proper name for the files I want to save by my components. What if the file already exists?

ITPro Today

May 3, 2005

1 Min Read
ITPro Today logo in a gray background | ITPro Today

Many a times, I struggled to find a proper name for the files I want to save by my components.

What if the file already exists?

I should not overwrite existing files etc. etc.

Well, this is a generic function I've been using since a long for getting countered name i.e. <> <>.Extension for saving the files.

This perevents me the problem of overwriting the files that are already present in the target folder.

Hope this will be of use to all of you.

Read more about:

Microsoft
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like