Thanks everyone, the folder that I will be renaming is a document folder, and there may be other pc’s that have files within the folder open, so I just want to check to see if any of the files are open/locked and if so rename it after all the users have closed the documents. The idea is for our Aladdins – Word Documents addin for outlook, I am making a Automatic document linker for our AutoSave, so if a property in an outlook contact like companyname changes and the document subfolder naming scheme uses the companyname, then the folder name will automatically be changed next time a document is created using Aladdins. Keeping the filing scheme current and accurate.
Basically taking the folder housekeeping automatic and away from the users.
I’ll keep looking for an answer, there must be some way to find out.
Jason
-----Original
Message-----
I'm confused. I've been told by our Network Admin that you can't rename a locked dll, as it's the same as deleting it. Yet I've just proved I can do it!
I went into a DLL (policy maintenance) and started flicking round subforms, then renamed the dll while still in it, and did some updating in the policy screen, then exited policy maint without a problem. When I tried deleting the renamed file (while the dll was running - under the old name?), it said there was a sharing violation and wouldn't let me. So it knew I'd renamed a locked file. The network guy tells me the server I'm doing this on is NT4 - and he says what I'm doing CAN'T be done!
Jason, in regard to renaming a locked folder, if you don't find a Windows call to determine if your folder is locked (and I assume there must be one), then you could always make a copy of the folder with your new name, then try deleting the original folder. If deleting the original works, then fine, if not, then something's using it, in which case you could delete the copy you made and thereby know you shouldn't rename it. Convoluted way of doing it - better if you can find the Windows call.
Dave
|
- Re: [DUG]: How do you explain this? Jeremy North
- Re: [DUG]: How do you explain this? Deck
- Re: [DUG]: How do you explain this? Phil Middlemiss
- [DUG]: Check if file is locked? Jason Coley
- RE: [DUG]: Check if file is locked? Conor Boyd
- RE: [DUG]: Check if file is locked? Dave . Jollie
- Re: [DUG]: Check if file is locked? Paul Mckenzie
- RE: [DUG]: Check if file is locked? Steve Aish
- RE: [DUG]: Check if file is locked? Dave . Jollie
- RE: [DUG]: Check if file is locked? Myles Penlington
- [DUG]: Sending a record to a C++ DLL Jason Coley
- [DUG]: Sending a record to a C++ DLL Phil Middlemiss
- Re: [DUG]: Sending a record to a C++ DLL Corey Murtagh
- Re: [DUG]: Sending a record to a C++ DLL Phil Middlemiss
- RE: RE: RE: [DUG]: Check if file is locked? Jason Coley
- RE: RE: RE: [DUG]: Check if file is locked? Myles Penlington