I am trying to rename a file, and I am getting the error “Rename File: Cannot create a file when that file already exist”… I am not trying to create a file I am trying to rename the file in the folder
I tried moving the file with a new name and that did not work either, my only success is creating a new file, then appending the CSV with the new data… but that won’t work with the PDF’s I need to move.
Also, once renamed I need to get the “new” file so I can utilize an upload file to sharepoint function
Use the if condition to know about the renamed file already exists or not.
System.IO.File.Exists(in_CommissionFolderPath &“IFC Commissions”&“_”&i_TodaysDate+“.csv”)
Place the Delete file activity(in_CommissionFolderPath &“IFC Commissions”&“_”&i_TodaysDate+“.csv”) in then and place Rename file in it.
Else, place the Rename file and actually your activity is good, place it.