Hello,
The process stops running within the Switch with the following error.
“The MoveFile to 2015 Folder: Cannot create a file when that file already exists”
It appears that MoveFile is creating the new files named “invoices 2015”, “invoices 2016”, “invoices 2017” and “invoices 2018”, instead of creating folders with those names and moving the files into them. Any thoughts on what may be causing this? Thanks
as the activity name said, it is only for move files already stored in your local machine, not for creating folders, if you want use the create folder activity
Move file basically will move the file but not create folders and basically there is some confusion in the documentation…it says destination path…but ideally it is the full destination path including the filename as well…so what you gave is to create a file in folder InvoicesDirectory with a filename of invoices 2015…and I guess you are downloading to same folder
So instead first use a create folder and then use Path.Combine(InvoicesDirectory,Path.GetFineNameWithOutExtension(File.FullName),File.Name)
And in create folder Path.Combine(InvoicesDirectory,Path.GetFineNameWithOutExtension(File.FullName))