CodeCarvings.Piczard
GetUniqueFileName(String,String) Method
See Also  Send Feedback
CodeCarvings.Piczard.Helpers Namespace > IOHelper Class > GetUniqueFileName Method : GetUniqueFileName(String,String) Method

folderPath
Directory to look for file name in.
fileName
File name to check.
Returns an unique file name.

Syntax

Visual Basic (Declaration)  
Public Overloads Shared Function GetUniqueFileName( _
   ByVal folderPath As String, _
   ByVal fileName As String _
) As String
C#  
public static string GetUniqueFileName( 
   string folderPath,
   string fileName
)

Parameters

folderPath
Directory to look for file name in.
fileName
File name to check.

Return Value

The file name indicated in fileName if unique; otherwise this function returns fileName, appended with a number from 1 to 9999999, to make it unique.

Requirements

Platforms: Windows 8, Windows 7, Windows Vista, Windows XP Professional, Windows 2000 - Windows Server family: 2012, 2008.R2, 2008, 2003, 2000

See Also

©2013 Sergio Turolla. All Rights Reserved.