#49278 - 2000-03-27 08:56 AM
del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
How do i delete al items in C:\windows\temp without the message yes or no at logon. nboersen@vug.nl
|
|
Top
|
|
|
|
#49279 - 2000-03-27 09:29 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
HiI would guess at using SENDKEYS. ------------------ Don Davidson Network Engineer http://www.insight-media.co.uk
|
|
Top
|
|
|
|
#49280 - 2000-03-27 09:58 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
Don, Show me in a script, so i can try if it works.
|
|
Top
|
|
|
|
#49281 - 2000-03-27 10:13 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
HiHad another brainwave! Try CD "c:\windows\temp" DEL "*.*" The manual says DEL does not prompt for user intervention. I was thinking of SENDKEYS for use with a batch file! ------------------ Don Davidson Network Engineer http://www.insight-media.co.uk
|
|
Top
|
|
|
|
#49282 - 2000-03-27 10:20 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
Hi, i have tryd this, but it is not working correctley, i is not working at all togetter with a .scr script.
|
|
Top
|
|
|
|
#49283 - 2000-03-27 10:25 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
HiWeird it works for me!  Ok what clients? NT4 or Win9x ? I also ran the two lines in debug mode and then checked c:\windows\temp and files had gone! Post the code you are working with and any other relevant info. ------------------ Don Davidson Network Engineer http://www.insight-media.co.uk
|
|
Top
|
|
|
|
#49284 - 2000-03-28 01:36 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
Hi, I'm a bit new but I hope you don't mind me butting in. We use the following in hte autoexec.bat:Del C:\windows\temp\*.tmp but if you wanted to use it in a login script, Del C:\windows\temp\*.tmp /y should do it. HTH Craig
|
|
Top
|
|
|
|
#49285 - 2000-03-28 03:13 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
Don, I use NT & Win9xBut nothing works in comination with kix32. nick
|
|
Top
|
|
|
|
#49286 - 2000-03-28 03:15 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
Craig, this will not work, I try'd but all the files and directory's still stay on ther places and will not be removed while using kix32.
|
|
Top
|
|
|
|
#49287 - 2000-03-28 03:53 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
Did you try this?SHELL "%COMSPEC% /C del c:\windows\temp\*.*"
|
|
Top
|
|
|
|
#49288 - 2000-03-28 04:01 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
Bonk, This will work a little bit, but i wil still have to say Y, on when ther was askt "are you shure you want to delete al these files? and thad is wat i dont want to see on my screen. even with /y he is telling me that it is a wrong option /y.nick
|
|
Top
|
|
|
|
#49289 - 2000-03-28 04:37 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
HiA guess here as I have not used this function before! SENDKEYS "Y {ENTER}" Hope this helps. ------------------ Don Davidson Network Engineer http://www.insight-media.co.uk
|
|
Top
|
|
|
|
#49290 - 2000-03-28 04:51 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
Don, No this is not working, Script error : unknown command !. SENDKEYS "y {enter}". and still the machine asks the same question. yes or no.nick
|
|
Top
|
|
|
|
#49291 - 2000-03-28 05:03 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
HiSilly me READ THE ***** MANUAL! SENDKEYS ("Y {ENTER}") Try again  ------------------ Don Davidson Network Engineer http://www.insight-media.co.uk
|
|
Top
|
|
|
|
#49292 - 2000-03-28 06:02 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
Sorry but the sam question is comming back. Are you sure you want to remove all files Y/N?script error : unknown command !. SENDKEYS ("y {enter}")
|
|
Top
|
|
|
|
#49293 - 2000-03-28 10:12 AM
Re: del *.tmp in C:\windows\temp
|
Bryce
KiX Supporter
   
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
ok i couldn't stay from this one  here is some code that will remove all files and directories in the %temp% directory. you can also download the file here http://www.neosoft.com/~brycel/kix/other_scripts/del_temp/del_temp.kix code:
break on cls $tempdir = "temp1.dat" $tempfile = "temp2.dat" dim $tempdir_data[99999] :wrong ? "This will Delete all files and Directories in" ? "%temp%!!! are you sure?(y/n)" get $yn select case lcase($yn) = "y" ;run rest of code case lcase($yn) = "n" exit case 1 goto wrong endselect shell "%comspec% /c dir %temp% /ad /b /s > $tempdir" shell "%comspec% /c dir %temp% /a-d /b /s > $tempfile"
? "Deleting the files in %temp%" gosub kill_files ? "Removing all Directories in %temp%" gosub Kill_directories del $tempdir del $tempfile exit ;---------------------------- :Kill_Files ;----------------------------
$q = open(1,$tempfile) $tempfile_data = readline(1) while @error = 0 del $tempfile_data $tempfile_data = readline(1) loop $q = close(1) return ;---------------------------- :Kill_directories ;---------------------------- $array_count = 0 $q = open (1,$tempdir) $tempdir_data[$array_count] = readline(1) while $tempdir_data[$array_count] <> "" $array_count = $array_count + 1 $tempdir_data[$array_count] = readline(1) loop $q = close(1) rd $tempdir_data[$array_count] while $array_count >= 0 rd $tempdir_data[$array_count] $array_count = $array_count - 1 loop return
|
|
Top
|
|
|
|
#49294 - 2000-03-28 09:35 PM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
why dont you use the deltree command in DOS then call the kix script from within DOS to execute the remaing code.
|
|
Top
|
|
|
|
#49296 - 2000-03-30 05:31 AM
Re: del *.tmp in C:\windows\temp
|
Anonymous
Anonymous
Unregistered
|
Bryce,it looks nice, but there is a script error : unkwon command: dim $tempdir_data[99999] What to do on this ? nick
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(Allen)
and 1198 anonymous users online.
|
|
|