The WinApi class holds some nice functions for file manipulation, like the
I think every programmer has used one of those functions in Ax at one time or another, as they can be really helpful.
They have one big drawback though: They need to be executed on the client tier. Trying to use these functions in batch processing (so on the AOS), will result in errors.
Now you might wanna have a look at the WinAPIServer class. This class holds similar functions as the WinApi class, but these methods run on the server. This is a good alternative when you need to do some file manipulation in batch mode, but overall functionality is a bit limited here. Of course, you are free to extend the WinAPIServer class with your own, desired methods.
Assigning your CLR Interop permissions, and you’re good to go!