How to create a copy of moved files in share point?

I have script where I have to move files from one share point location to multiple share point locations.
If any error during file move, the particular file will be moved to error folder.
The additional requirement now is to save a copy of the successfully moved files into ‘Processed Folder’ and I am not sure how to do that since there are multiple destination folders and the folders not only contain the files that I moved.

Thanks

@sunilkanth

Becore moving …use a copy file and copy the file to processed folder and then use move

Cheers

what if the move fails after copying

Use retry on the move, if it still fails, kill excel in retry attempts n then try

I am moving the file to many share points and the access to the share point may not be there sometimes.

then your copy shoul also not work in case of no access, use a try catch and handle that

I need a copy in local and move in share point

Do one thing, first copy the file to local and move it to all locations and then move file

@sunilkanth

If the move dails after copying you can deete the file as well…as you already will be having. The copied file details from the output

Cheers

Hi @sunilkanth

Try this-

  1. After successfully moving a file to its destination SharePoint location, add a “Copy File” activity to make a copy of the file.
  2. In the “Copy File” activity, provide the source file path as the file that was just moved and the destination file path as the desired location in the “Processed Folder.”
  3. If the copy operation is successful, the file will be saved in the “Processed Folder.” You can handle any errors that may occur during the copy operation using a “Try Catch” activity.

Thanks!!