Solved

Moving files


Badge +2

The File package does not contain a “Move file” action. Why not?

Our workaround is to use the Copy/Delete actions to copy a file from a source folder to destination folder, and then delete the file from the source folder. This approach takes time. 

Is there another way to rapidly move the files other than copying/deleting?

I appreciate any suggestions.

icon

Best answer by jon.stueveapeople 15 May 2024, 17:40

View original

2 replies

Userlevel 3
Badge +7

No, there isn’t a Move action. We do recommened that you Use Copy, check that it was successful, then Delete after the copy is confirmed. 

Reasons:

  • The runtime user might not have access to save to the new folder
  • The runtime user might not have delete access to the old folder

Depending on a possible error condition, the first might error out, then the delete would remove the file and destroy it, while not having the first file copied out of the folder. If an error occurred on the second action, you’d create duplicate files, copying to new folder and not being able to delete the original.

Hope that helps.

Jon

Badge +2

Thank you, Jon!

We decided to use the move command from the CLI.

Reply