there might be a duplicate file while moving to destination location in that case ,
public boolean getFileExists(filepath _fileName)
{
System.IO.FileInfo fileInfo;
new InteropPermission(InteropKind::ClrInterop).assert();
fileInfo = new System.IO.FileInfo(_fileName);
return fileInfo.get_Exists();
}
if(this.getFileExists(strFmt('%1%2%3', DestinationPathFolder, fName, fType)) == true)
{
System.IO.File::Delete(strFmt('%1%2%3', DestinationPathFolder, fName, fType));
}
public boolean getFileExists(filepath _fileName)
{
System.IO.FileInfo fileInfo;
new InteropPermission(InteropKind::ClrInterop).assert();
fileInfo = new System.IO.FileInfo(_fileName);
return fileInfo.get_Exists();
}
if(this.getFileExists(strFmt('%1%2%3', DestinationPathFolder, fName, fType)) == true)
{
System.IO.File::Delete(strFmt('%1%2%3', DestinationPathFolder, fName, fType));
}