-
Check whether the source file and destination path are exists programmatically before moving the file using methods File.Exists and Directory.Exists respectively .
-
Use the below methods to check whether the path and file name has any invalid characters and replace as needed.