RobotStudio event

unload modules

Options
Dear All,

I want to unload all existing program modules on the controller programmatically. All program modules can be found iteratively and their handles are available.

To unload one module, say, aModule, we use the following code:
string fullpath = string.concat(aController.FileSystem.RemoteDirectory, "/", aModule.Name, ".mod");
aModule.SaveToFile(fullpath);

The program throw an exception - "General File Handling Error"; I have no idea about what is going on. Can anybody help me on this? Many thanks

Comments

  • newform
    Options
    Deal All,

    Sorry for bothering you.

    I figured out what the problem is. The directory instead of full path should be passed to the function.

    Thanks anyway.