andycharger 0 Posted September 7, 2004 On my server (SBS2003) i have shared folders. I nonw have them locked down so users cannot move them. However, they can edit and save the files inside the folders. Now though, when they change a file and save it, it creates a .tmp file as well which we cannot delete. Anyone heard of this and know why its happening? Any help would be appreciated. Andy Share this post Link to post
adamvjackson 0 Posted September 7, 2004 Who has ownership of the .tmp files? SYSTEM? How are the NTFS permissions set on those files? I assume you're using Microsoft Office (version?), since it typically creates ~*.tmp filenames. Check your permissions so that users have rights to delete files in that folder. This is important since the applications are running under the user context, and cannot remove temp files if the user cannot. And yeah, I know giving users rights to delete files can be an issue... Share this post Link to post
ScinteX 0 Posted September 8, 2004 i had this problem: we wrote a vb app that did something like: use .net and use the FileSystemWatcher class. Monitor the folder(s) and when a tmp file appears try to delete it. If you get somekind of error (e.g. its in use) then carry on monitoring otherwise delete it. You therefore end up with only in use files. We then created a separate account soley for this purpose. Of course this depends upon how worthwhile you think this method is since a batch file will do the same job, just not as frequently. We needed instant deletion so this was handy for us. Also you need to know the applications very well since deleting files that apps assume are already there can produce some interesting errors! :x If this way looks viable then check out Visual Systems Journal (VSj) july/august edition 2004 magazine since theres a good article on this class in there. Anyway enough of my waffling! have fun ---- Scin Share this post Link to post
ScinteX 0 Posted September 8, 2004 hey alec! notice im back?! lol hehe so many ways to skin a cat Our little app is an exe that sits in memory. However it is form based (cos we have constants we can change like where to monitor, monitor 9-5 etc. etc) so it spends its whole life minimised on the taskbar with a little message saying that it is running (so no open systems guys go closing it). Its launched every morning when the server comes back up - we made it launch as a service just to make things easy. FileSystemWatcher is great because it is event driven. Therefore we tell it to hook into the Created event. When a tmp file is created it bursts into life and deletes it However if we meet an 'in use/access denied' error we just loop around until it can be deleted. Admittidly its probably not the nicest way in this case since the files might be in use for a long time. But then again whats a few processor clicks between friends?! Share this post Link to post
ScinteX 0 Posted September 8, 2004 wow go with that script dude! Flippin heck alec that was quick! Ok ok ok kill the VB idea and go the BAT route! Share this post Link to post
ScinteX 0 Posted September 8, 2004 alec u crack me up! hehe handy programming yes, although i dont do it as a trade as such anymore. i sort of act as a go between- interpreting users requirements into (hopefully) stable, appropriate solutions. by far the best solution is usually the one you can do in 'as it comes/vanilla' XP/NT/whatever-OS. I just have the horrible habit of assuming VB is available since im so used to being at my desk. But top marks to you Mr- WSH comes to the rescue again. So I think we've covered all angles?! nice Share this post Link to post