Post date: Aug 26, 2009 4:34:16 PM
public static void Tag(string filePathAndName, string tag)
{
if(File.Exists(filePathAndName))
{
string oldFileName = Path.GetFileName(filePathAndName);
string oldFilePath = Path.GetDirectoryName(filePathAndName);
string newFileName = string.Format(@"{0}{1}{2}", oldFilePath, tag, oldFileName);
File.Move(filePathAndName, newFileName);
Console.WriteLine(newFileName);
}
}