Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void CheckExsist(ref string sourcePath, ref int counter)
- {
- if (System.IO.File.Exists(sourcePath))
- {
- sourcePath = sourcePath.Replace(Path.GetFileName(sourcePath), Path.GetFileNameWithoutExtension(sourcePath) + "(" + counter + ")" + Path.GetExtension(sourcePath));
- counter += 1;
- CheckExsist(ref sourcePath, ref counter);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement