We have a BPM that renames attachment files to have a timestamp so that people aren’t overwriting other attachments. We can gone through several upgrades without issues with it, but now it’s giving us a warning that it won’t be supported in the future. What should we use instead? (or conversely, is this still needed?)
Jason Woods (jawoods@epicor.com)
12/6/16 */
string oldFileName = "";
string newFileName = "";
foreach (var tt in ds.CustomerAttch.Where(tt => tt.RowMod == "A"))
{
oldFileName = System.IO.Path.GetFileName(tt.FileName);
newFileName = System.IO.Path.GetFileNameWithoutExtension(tt.FileName) + "-" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + System.IO.Path.GetExtension(tt.FileName);
System.IO.File.Move(tt.FileName, tt.FileName.Replace(oldFileName, newFileName));
tt.FileName = tt.FileName.Replace(oldFileName, newFileName);
}```