Joe4 Posted May 22, 2015 Share Posted May 22, 2015 So I created this script ($sSrcFldr details modified for privacy reasons):Local $sSrcFldr = "\\19x.xxx.xx.xx\FolderName\Stuff\"Local $sDestFldr = "C:\Databases\"Local $sSrcDBName = "MyDB.accdb"Local $sDestDBName = "DatabaseName.accdb"; Copy over database (will create directory and overwrite old files if necessary)FileCopy($sSrcFldr & $sSrcDBName, $sDestFldr & $sDestDBName,9); Open Access databaseShellExecute($sDestFldr & $sDestDBName)When I run it as an ".au3" file, it runs perfectly. But when I try to compile it to an executable file, I get an error saying "Error opening destination file".Why is this happening?Thanks Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 22, 2015 Moderators Share Posted May 22, 2015 Joe4,Do you perchance have one of those folders (or the folder of the script itself) open in Explorer or another app? That has been known to produce that particular error message.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JohnOne Posted May 22, 2015 Share Posted May 22, 2015 (edited) Perhaps your code editor is running as admin and your exe is not. Edited May 22, 2015 by JohnOne misread problem AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Developers Jos Posted May 22, 2015 Developers Share Posted May 22, 2015 But when I try to compile it to an executable file, I get an error saying "Error opening destination file"Is this an aut2exe error when you select Compile(F7)?Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Joe4 Posted May 22, 2015 Author Share Posted May 22, 2015 Do you perchance have one of those folders (or the folder of the script itself) open in Explorer or another app? That has been known to produce that particular error message.That was it!Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now