Managing files and folders in windows through Grasshopper

Hello everyone,

I was looking for a plugin (would be better) or a different way to manage files and folders in windows through Grasshopper. I mean basic commands, as copy, duplicate, rename, move and delete.

Files to manage are not just Rhino files, but pdf, dwg, etc.

Thanks a lot for your help!

What’s wrong with the Windows File Manager?

Hi @alessio.maurizi1990,

If you know anything about coding, then it shouldn’t take too much to make some C# components that use .NET’s System.IO.File, System.IO.Directory and System.IO.Path classes. All of thse are pretty easy to use and provide the functionality you want.

– Dale

1 Like

Hi @dale, thanks a lot for your help! I’m not advanced with coding but I will try to use that library. Do you know if I can use it with Python?

@Joseph_Oster Windows File Manager is fine for users that doesn’t manage hundreds files every day.

You might like Beyond Compare, it’s super useful!
Scooter Software: Home of Beyond Compare

You can compare entire drives and folders at high speed, checking just sizes and modified times. Or, thoroughly verify every file with byte-by-byte comparisons. FTP sites, cloud storage, and zip files are integrated seamlessly, and powerful filters allow you to limit what you see to only what you’re interested in.

Once you’ve found specific files you’re interested in, Beyond Compare can intelligently pick the best way to compare and display them. Text files can be viewed and edited with syntax highlighting and comparison rules tweaked specifically for documents, source code, and HTML. The text contents of Microsoft Word .doc and Adobe .pdf files can also be compared but not edited. Data files, executables, binary data, and images all have dedicated viewers as well, so you always have a clear view of the changes.

You can import os, which provides native directory and file management. Here’s a tutorial from at quick Google search:

Edit: But yes, you can also import System in GHPython to use the .NET functionality Dale pointed to.

1 Like

The malware potential of that is truly frightening.

Indeed, one ought always lock the solver before opening an unknown file!

That would be almost every file from this forum! Wise suggestion but not very practical. Wouldn’t it be nice if GH restricted all file and network operations with a warning and “Are you sure?” dialog?

I know this has been discussed for years…

@AndersDeleuran Thanks a lot! This is what I was looking for. In little and easy steps I was able to do what I needed. It’s a great starting point to develope something.

@Joseph_Oster I will take a look also to the scooter software. It looks like bulk rename, the software I was already using… I hope this one could have more functionality!

1 Like