Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleted temp files...
Message
From
06/02/2002 12:23:17
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00616127
Message ID:
00616142
Views:
29
This message has been marked as the solution to the initial question of the thread.
>I am printing 500 .PDF files to a printer with adobe. It created many hidden temp files on windows\temp directory.
>
>The problem is that the files are not erased from the drive after the print.
>
>Is there an API call that will clean up the temp directory that I can call?
lcPath = 'c:\temp\'
lcSkeleton = '*.tmp'
declare integer SetFileAttributes in Win32API ;
	string @ lpFileName,  integer dwFileAttributes
declare short DeleteFile in win32API string @ lpFileName
lnFiles=adir(arrFiles,lcPath+lcSkeleton,'HS')
for ix=1 to lnFiles
  SetFileAttributes(lcPath+arrFiles[ix,1], 0)
  DeleteFile(lcPath+arrFiles[ix,1])
endfor
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform