Hi
I have a simple app which renames 3 files and 2 folders to switch between multiple installations of another app. To keep things simple I use the Name statement.
All is well unless the user decides to open one of the sub folders in explorer which results in my app crashing because the top level folder cannot be renamed.
I have got round this by using an error trap function which renames the file or folder then if successful, i.e. no error occurs, renames it back to the original. If all files and folders test ok then the switch occurs, otherwise an error message is displayed advising the user to close open windows and retry.
While this works it is very clumsy and I wondered if anyone can suggest a more elegant solution. Windows knows whether the folder can be renamed so can this information be tested via an api call for example?
t..i.a.
Andy
I have a simple app which renames 3 files and 2 folders to switch between multiple installations of another app. To keep things simple I use the Name statement.
All is well unless the user decides to open one of the sub folders in explorer which results in my app crashing because the top level folder cannot be renamed.
I have got round this by using an error trap function which renames the file or folder then if successful, i.e. no error occurs, renames it back to the original. If all files and folders test ok then the switch occurs, otherwise an error message is displayed advising the user to close open windows and retry.
While this works it is very clumsy and I wondered if anyone can suggest a more elegant solution. Windows knows whether the folder can be renamed so can this information be tested via an api call for example?
t..i.a.
Andy