Hi, I have a wombat component which does not work (error: Path access denied). I tried a different path but that results in the same error.
I believe this can also be done in C#, hoping that someone can help me with that.
I’m looking for a copy/move from path entry and a copy/move to path entry with a boolean to trigger it.
I read in another post that indeed people referred to that as well. Unfortunately I don’t have any knowledge on how to write it. I was hoping people with more experience could help me with that tbh
Thank you. Unfortunately it does not work as well. I’ve saved the grasshopper definition on my local drive too to test it out but the result is the same. Do you guys have any other possible solutions to try out?
As Nathan said, it’s a permission problem.
Where the .gh file is stored is irrelevant.
The problem is rhino (and so grasshopper, that execute the .gh code) that have not enough permissions to work with files in the machine.
Maybe OSx have ways to give more permissions to a program?
On windows you can “Run as Administrator” any program.
I know nothing about anything related to Apple.
Maybe open rhino with a sudo?
Rhino has full access to my filesystem. I can’t add Grasshopper in there I believe.
I’ve tried to open it with sudo but unfortunately the same result in grasshopper.
@dan, this sounds a bit like the user from last week with weird access problems. Was it for the user a case of rebooting his machine to get everything going again, or were there other steps he had to do first?
This is indeed odd. I’m unable to reproduce this behavior here. I can use the simple example @maje90 provided to copy a file, as expected.
If we’re thinking of the same case @nathanletwory, it’s the one where the user couldn’t copy the Rhino app bundle into /Applications, but could copy to ~/Desktop…that one? The user ended up just rebooting his machine and it worked fine.
In your attached script you are copying folders. On Windows that gives the error message 1. The target file "C:\Users\Nathan\Downloads\B" is a directory, not a file. (line: 0).
If that doesn’t work, then I suspect it has something to do with the creation of those folders using your C# script. As a test, if you create a folder using macOS’s Finder (not a C# script) does the File.Copy operation succeed (using a fully-expanded path to a file)?
It was my mistake as I only used the directory path instead of the file path. I look right over it (a bit dumb of me). I think I was thrown off by the error messages and went searching in the wrong direction. It works as expected now.
Thank you for your patiences and help. I appreciated it a lot!
Nice solution, unfortunately seems like this don’t have the capability to overwrite existing files? It is possible to modify the code so can overwrite existing files in the destination folder? Thank you.