Takes a passed in originalFileName and checks if a file with that name already exists in the passed-in directory and if so returns a new name that is made unique by appending a number at the end(i.e. _1, _2,...)

Declaration Syntax

Public Shared Function AppendFileNumber( _
	ByVal originalFileName As String, _
	ByVal directory As DirectoryInfo _
) As String
public static string AppendFileNumber(
	string originalFileName, 
	DirectoryInfo directory
);
public: static String AppendFileNumber(
	String originalFileName, 
	DirectoryInfo directory
);
public static function AppendFileNumber(
	originalFileName : String, 
	directory : DirectoryInfo
) : String;

Parameters

originalFileName
The original file name to check for. 
directory
The base directory to check for existing files. 

Return Value

The originalFileName if no file in the passed-in directory exists, otherwise the originalFileName appended with an underscore and a number which will make that name unique.

Requirements

Namespace: Eas.WebCrawler.PlugIns.FileNamers
Assembly: Eas.WebCrawler.PlugIns (eas.webcrawler.plugins.dll)

See Also

NameHelper Class | NameHelper Members | Eas.WebCrawler.PlugIns.FileNamers Namespace