Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File Access Denied
Message
 
 
To
15/10/2001 13:45:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00568662
Message ID:
00568694
Views:
12
It looks like you are trying to rename file while it still open by the program ccplot. Check Ed Rauh's API_APPRUN program in file#9477 that allows for the caller to wait for the batch file or program to complete.

>This is my code. I get File Access Denied on Rename line.
>
>Public gnLODModels, myFileList2, dtt2, dtt3, myNewNameb
>Dime myNewNameb(1)
>
>dtt3 = 0
>Dime gnLODModels(1)
>lftdn2 = AllT(ThisForm.Text5.Value)
>Set Default To "\\Gv-engineering\drawing\wgen\prerel\"
>dtt2 = ADir(gnLODModels,lftdn2 + '*.*')
>Set Default to "\\gvmain\applications\foxapps\drawingPDM"
>dtt3 = Int(ALen(gnLODModels)/5)
>
>Set Default To "D:\Plotfile\in\"
>Delete File *.*
>
>For x = 1 To dtt3
> Dime myNewNameb(1)
> dfrt = AllT(ChrTran(gnLODModels(x,1)," ",""))
> dfrt = SubStr(dfrt,1, Len(dfrt)-4)
> Set Safety Off
>STRTOFILE('Request;' + 'PLOTTER=' + '"sample postscript plotter";' + 'NEWPLOT=' + '"\\gv-engineering\drawing\wgen\prerel\' + gnLODModels(x,1) + '";' + 'COPIES= 1;',"C:\Temp\tempjan.bat")
> Set Default to "C:\Temp"
> Run /N2 D:\ccdraft\bin\ccplot.exe -rk tempjan.bat
>
> Set Default To "D:\Plotfile\in\"
> DO WHILE ADIR(myNewNameb) < 1
> ENDDO
>
> Rename myNewNameb(1,1) + "." To &dfrt + "."
> Copy File &dfrt To \\gvmain\groups\everyone\viewfiles\in\&dfrt
> Delete File &dfrt
> Release myNewNameb
> Set Safety On
> Set Default to "\\gvmain\applications\foxapps\drawingPDM"
>Next x
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform