chrisguitarguy's solution is the way to go ^^.
Just to add when a plugin is activated the pathfolder/name is stored in the get_option
, so using
get_option( 'active_plugins', array());
will still store the folder name if the folder or/name even if the plugin name isthey are changed. If you change the folder or plugin name on an active plugin the plugin will be de-activated, and thus require activation and storing of the correct dirfolder/name.
Though some plugins will break if you do so, and thus not be activated so it's outside your concern.