View Full Version : How to verify, delete folder and files in temp folder..
lepinski
08-19-2004, 01:40 PM
My proyect unzip files in temp folder, (pdf files), when I close autorun, and the pdf is open, not delete folder and files,
How to make for autorun not close, and show message, until pdf are closed.
Thanks
SUF6NEWBIE
08-19-2004, 09:24 PM
Hi, when you say "pdf is open" ...why is it open ..do you have to have AcroRd32.exe (adobe acrobat running while unzipping to temp folder).
1. The Operating system monitors 'files in use' while your App is running
tip: use the "setcurrentfolder" action to something Other than the location
the files are being unzipped to...this helps force the Os 'letting go'
of files in use and the created folder\contents can be deleted
via the folder delete action (deletetree) ..as long as Acrobat is not running or other called programs are Closed.
2. Try and create a unique folder in _TempFolder.."\\myunique\\";
to unzip the files to.. can do a Folder.find action to see if target folder
already exists..if so append something..eg myuniquefolder = "UserPdfs.Tmp";
if this folder already exists set a new unzip folder variable:
myuniquefolder = "UserPdfs.Tmp_1"; check if this exists etc
setcurrentdir _TempFolder.."\\"; --root of users temp directory
then unzip to: _TempFolder.."\\"..myuniquefolder.."\\";
(if autorun.exe is running from the _TempFolder) you can unzip to the autoplay root folder(autocleanup will remove anything inside..)
..again as long as the file is Not being used by a program.
3. Explore the enumerateprocccess action
tip: the target exe for enumerate proccesses is acrord32.exe
set the proccess find to: Close_Acro = "acrord32.exe";
4. and the 'queryallowprojectclose' function in the docs
(helps you control application.exit calls)
if you have trouble I or someone else will post a code example for you..
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.