Page 1 of 1 1
Topic Options
#124716 - 2004-08-10 09:03 PM Logon script for deleting local user's temp files
portal77 Offline
Fresh Scripter

Registered: 2004-08-10
Posts: 9
Loc: Tampa, FL. USA
Ok, I am new to KiXstart and logon scripting in general, but I know this is possible. I need to make a logon script for Windows NT 4.0 that can remove all of the .tmp files from a local user(s) hard drive. Is KiXstart the right tool for this, or is it overkill?

Thanks,

p77
_________________________
Thanks yo, p77

Top
#124717 - 2004-08-11 10:36 AM Re: Logon script for deleting local user's temp files
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
Hi,

You may use the DEL command. Something like Del "C:\Temp\*.Tmp"

For more details click on the link below

DEL

Aaron
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#124718 - 2004-08-11 12:18 PM Re: Logon script for deleting local user's temp files
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
AFAIK KiXtart DEL won't delete files from subdirectories (the "/S" flag means delete system files) so if you really mean that you want to delete *.tmp files from anywhere on the drive you will need to use the DOS DEL built-in:
Code:
Shell '"%COMSPEC%" /C DEL /S /F C:\*.TMP'



NB, I checked this using DOS DIR, and it matched suffixes such as ".tmpl" which start .tmp, so be careful.

The problem is that this will take a very long time to run, unless you can limit the scope of the search.

Top
#124719 - 2004-08-11 02:28 PM Re: Logon script for deleting local user's temp files
portal77 Offline
Fresh Scripter

Registered: 2004-08-10
Posts: 9
Loc: Tampa, FL. USA
By narrowing the scope of the search, do you mean narrowing down exactly what directory path the temp files are located? Could I do multiple paths?

Thanks,
p77
_________________________
Thanks yo, p77

Top
#124720 - 2004-08-11 03:21 PM Re: Logon script for deleting local user's temp files
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

By narrowing the scope of the search, do you mean narrowing down exactly what directory path the temp files are located?




Yes.

Quote:

Could I do multiple paths?




Yes. Either repeat the command for each directory, or specify multiple paths with the command.

If the files that you are looking for are always created in the Windows temp directory it may be simpler to use the environment variable %TEMP% to locate it.

The best solution however will depend on the operating systems you need to support, and what you are actually trying to do.

I get the impression that you are a bit unsure exactly what it is you are trying to do. I know I am. Post a little more information, including:
  • What are these "*.tmp" files?
  • What creates them?
  • Why do you think you need to remove them during the login process?
  • What versions of Windows does the script need to run on?
  • What version of KiXtart are you using?
  • What else can you tell us that will help us give you the best solution?

Top
#124721 - 2004-08-11 03:47 PM Re: Logon script for deleting local user's temp files
portal77 Offline
Fresh Scripter

Registered: 2004-08-10
Posts: 9
Loc: Tampa, FL. USA
I work in a massive call center and our quality development team uses a digital phone logger to record agents on the floor talking to customers. Problem is, this digital logger creates massive temp files on the local hard drive which in tandem removes all space. I usually end up getting 5 or more calls a day to free up had drive space so they can open attachments in their e-mail or record other calls. I just want it automated.

Thanks for all the help!

p77
_________________________
Thanks yo, p77

Top
#124722 - 2004-08-11 04:04 PM Re: Logon script for deleting local user's temp files
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You still have not provided the detail requested. Where are these temp files created? Are they always in the same location? Are they in %TEMP%? Have you looked at the CleanTempFiles() UDF?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#124723 - 2004-08-11 04:33 PM Re: Logon script for deleting local user's temp files
portal77 Offline
Fresh Scripter

Registered: 2004-08-10
Posts: 9
Loc: Tampa, FL. USA
The temp files created by the digital logger are stored here:

c:\documents and settings\<user_name>\temp

_________________________
Thanks yo, p77

Top
#124724 - 2004-08-11 04:54 PM Re: Logon script for deleting local user's temp files
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Perhaps you are trying to fix the wrong thing.

If the call logger is creating huge temporary files, it must be doing it for a reason.

Either it needs them (in which case you shouldn't be deleting them) or it doesn't need them in which case you should get onto the software supplier for a fix.

Also consider that if the files are being created all the time, then cleaning them up during login is not going to help much. You will either need to schedule the job to run regularly, or give the users a "purge" icon on their desktop to run the job and clean up.

However, I'd go for getting a software fix. It's unreasonable to expect your users who should be busy at their jobs to be taking time out to clear up after a dodgy application.

Top
#124725 - 2004-08-11 05:00 PM Re: Logon script for deleting local user's temp files
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Agree with Richard's points as well.

Here is a link to the UDF though that I think Les was referring to.

CleanDirectory() - Cleans up the temporary directories (or any arbitrary directory)
http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=82117

Top
#124726 - 2004-08-11 05:07 PM Re: Logon script for deleting local user's temp files
portal77 Offline
Fresh Scripter

Registered: 2004-08-10
Posts: 9
Loc: Tampa, FL. USA
the reason the logger makes such large temp files is because we have the recordings (in .ou and .wav format) are done in realtime saving on a server. The temp files are created in lieu of recording to the server. I have the newest update thus far.

_________________________
Thanks yo, p77

Top
#124727 - 2004-08-11 05:22 PM Re: Logon script for deleting local user's temp files
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
I guess I'm missing something here.

Why do you create the files in the first place if you are going to arbitrarily delete them?

If they are needed for quality control shouldn't they be archived somewhere?

Surely the call logger software has some configuration for where the files are kept, how many are kept and how long they are kept for?

Maybe you should configure the logger software to store all the files in a centralised location, and purge (say) anything over 30 days old with a scheduled daily task?

Top
#124728 - 2004-08-11 05:32 PM Re: Logon script for deleting local user's temp files
portal77 Offline
Fresh Scripter

Registered: 2004-08-10
Posts: 9
Loc: Tampa, FL. USA
it creates the temp files while recording the actual agents conversation onto our backup server. Basically, while recording, a temp file is simultaneously being created until the call is done being recorded, then it places the recording as a .ou or .wav (archive) to our server (but the temp is already created on the local hard drive). There is not an editable fuction in the digital logger that can stop this.

so to answer your question(s):
-the temp file is not needed for archiving, the temp converts to a recording file .ou or .wav on our server.

-there is not a way to edit preference in DTL's Digital logger. www.digitalloggers.com
_________________________
Thanks yo, p77

Top
#124729 - 2004-08-11 05:40 PM Re: Logon script for deleting local user's temp files
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Well the CleanDirectory() UDF should be able to help you.

You could also place an entry in the Registry for a batch file or KiX script into Autorun to delete such files during every start up of the computer.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.04 seconds in which 0.019 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org