General information
Category:
Coding, syntax & commands
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only