Receiving Permissions error when moving files to subfolders

I'm new to Apple Development. I've converted a python program to swift. The operator selects a top level folder and the program moves files in and out of subFolders within the selected folder. How do I resolve the Permissions errors whenever accessing subfolders?

What permissions error?

If you want us to help you, you really have to give us the actual error you're receiving.

Code: 516 Domain: NSCocoaErrorDomain

Running MacOS 15.5 on Mac mini 2023 Chip M2 Pro

Receiving Permissions error when moving files to subfolders
 
 
Q