Jump to content
Compatible Support Forums
Sign in to follow this  
andycharger

Temp files in my Shared Folders

Recommended Posts

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

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

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

hey alec! notice im back?! lol

 

hehe so many ways to skin a cat laugh

 

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 smile

 

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

wow go with that script dude! Flippin heck alec that was quick!

 

Ok ok ok kill the VB idea and go the BAT route! laugh

Share this post


Link to post

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×