Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I make the program wait until file is created
Message
From
28/01/2004 09:46:20
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
28/01/2004 09:42:29
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00871366
Message ID:
00871368
Views:
13
Take a look at download #9477, or download #9352. Perhaps those can help.

>I have a scanning program, after scanning the file i change that scanned file's(tiff file) attribute to read only.
>
>but the problem is before the scanning job is finished, my program is trying to check wether the file exists or not at the location to change it file attribute to read only.
>
>Can you please tell me how i can make my program wait until the sccaning of the document is finished and that file(tiff) exists at the location, then go and change its file attribute to read only.
>
>###################################
>
>cFileName = "C:\ScanTool\twaincom.exe"
>
>cDir = "C:\ScanTool\"
>
>cParams= "C:\ScanTool\test.tiff -n -o -paperformatusletter -feederon -monochrome -r 200 -multipagetiff"
>
>ShellExecute(0,"Open",cFileName,cParams,cDir,1)
>clear dlls
>
>&&Before it created the tif file my program is checking the following:
>&&How can i make my program wait until the scanning is done and file(test.tif) exists at the &&location, then do the check and change the attribute to READ ONLY
>
>IF FILE("C:\ScanTool\test.tif") THEN
> oFSO = CREATEOBJECT("Scripting.FileSystemObject")
> oFile = oFSO.GetFile("C:\ScanTool\test.tif")
> * Set the read-only bit.
> oFile.Attributes = BITOR(oFile.Attributes, 1)
>ENDIF
>
>###############################################
>
>Please let me know how i can do the above criteria.
>Thank you very much.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform