You would need to stop all instances first.
At a minimum you would also need to change:
- InstanceName in
instances.json
- Path in
instances.json
- InstanceName in
AMPConfig.conf
for the instance
There may be other changes needed if it is a generic instance.
ampinstmgr repair
might be a better option after the directory names are changed but I am not sure how it would deal with the old instance details.
Of course, back up before playing around.