Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Program does not execute when compiled into Exe program
Message
 
 
To
12/11/2016 16:38:08
Sonny Tabano
Trams Printwork, Inc.
Mabalacat, Philippines
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01643256
Message ID:
01643270
Views:
74
There is absolutely no reason to use macro substitution in this code. I corrected your code inline.
>
>
>LOCAL lcDirPath, lcCurrentDir, oShell,  oDstFolder
>
>   With ThisForm
>	lcCurrentDir  = ALLTRIM(SYS(5))+ALLTRIM(SYS(2003))
>        lcDirPath     = ALLTRIM(.txtDirPath.Value)
>        IF EMPTY(m.lcDirPath)
>            Messagebox("Directory Pathname is Empty",0+16,"Invalid Entry")
>            Exit
>        ENDIF
>        IF .NOT. DIRECTORY(lcDirPath)
>            Messagebox("Directory " + m.lcDirPath + " Not Found!",0+16,"Invalid Entry")
>            Exit
>        ENDIF
>        SET SAFETY OFF
>	oShell = CREATEOBJECT("Shell.Application") && this may not work
>	oDstFolder = oShell.NameSpace(CurrentDir+"\datafile")
>	IF VARTYPE(oDstFolder)="O"
>	     oDstFolder.CopyHere(lcDirPath+"\*.*")
>	ENDIF
>        SET SAFETY On  
>
>>
>
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform