A win32file.ew question.

new topic     » topic index » view thread      » older message » newer message

--=======AVGMAIL-3FD17EFA4497=======

------=_NextPart_000_0005_01C3BC23.1658C720

I want to use deleteFile() to delete some areas of of the WINDOWS directory eg
TEMP, COOKIES etc...
deleteFile() always returns 0 Faulse. When I delete files not in the windows
directory deleteFile() returns 1 true. Is there some way around this. This is the
code im currently using:

sequence temp,temp_path
temp_path = getTempPath()
temp = {}
if empt_temp = 1 then -- Just an enable or disable flag.
 for i = 1 to length(temp_path) by 1 do
     if temp_path[i] < 92 or temp_path[i] > 92 then
      temp &= temp_path[i]
      else temp = temp & 92 & 92
     end if
 end for
 temp = temp & "*.*"
 error = deleteFile(temp)
print(1,error) -- = 0
puts(1,"\n") 
puts(1,temp) -- = C:\\win98se\\temp\\*.*
end if
end procedure


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 2/12/03
------=_NextPart_000_0005_01C3BC23.1658C720
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I want to use deleteFile() to delete some areas of 
of the WINDOWS directory eg TEMP, COOKIES etc...</FONT></DIV>
<DIV><FONT face=Arial size=2>deleteFile() always returns 0 Faulse. When 
I&nbsp;delete&nbsp;files not in the windows directory deleteFile() returns 1 
true. Is there some way around this. This is the code im currently 
using:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>sequence temp,temp_path</FONT></DIV>
<DIV><FONT face=Arial size=2>temp_path = getTempPath()<BR>temp = {}<BR>if 
empt_temp = 1 then -- Just an enable or disable flag.<BR>&nbsp;for i = 1 to 
length(temp_path) by 1 do<BR>&nbsp;&nbsp;&nbsp;&nbsp; if temp_path[i] &lt; 92 or
temp_path[i] &gt; 92 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; temp &amp;= 
temp_path[i]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else temp = temp &amp; 92 &amp; 
92<BR>&nbsp;&nbsp;&nbsp; &nbsp;end if<BR>&nbsp;end for<BR>&nbsp;temp = temp 
&amp; "*.*"<BR>&nbsp;error = deleteFile(temp)<BR>print(1,error) -- = 
0<BR>puts(1,"\n") <BR>puts(1,temp) -- = C:\\win98se\\temp\\*.*<BR>end if<BR>end 
procedure</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><BR>---<BR>Outgoing mail is certified Virus 
Free.<BR>Checked by AVG anti-virus system (<A 
href="http://www.grisoft.com">http://www.grisoft.com</A>).<BR>Version: 6.0.547 /

------=_NextPart_000_0005_01C3BC23.1658C720--
--=======AVGMAIL-3FD17EFA4497=======
Content-Type: text/plain; x-avg=cert; charset=iso-8859-2
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Description: "AVG certification"

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.545 / Virus Database: 339 - Release Date: 28/11/03

--=======AVGMAIL-3FD17EFA4497=======--

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu