Sign in to follow this  
Followers 0
trids

Fileinstall

4 posts in this topic

#1 ·  Posted (edited)

This is the first time I'm using FileInstall .. so I might be doing something wrong. But here is my code, and it returns 0 but doesn't actually place the file B) Oh and I am running the compiled version of the script

;Get the destination form the user    
    $sPathDest = FileSelectFolder ("Destination for new MDB", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}", 1 )  ;open at MyComputer, 1 = allow "New Folder"
    if @error then
        exit  ;user pressed cancel
    endif
    
;If there is already a file there, then first get the go-ahead    
  ;??????????
  ;??????????
  ;??????????
  ;??????????
  ;??????????
  ;??????????
  ;??????????


;ok proceed!    
    $nRC = FileInstall("D:\Trids\Au3zip\Test.mdb",$sPathDest,1)
    
    Msgbox (4096 +32,"","$nRC=" & $nRC)
    
Exit

:whistle: Am I missing something?

Edit: NT4 sp6a + AU3 v 3.0.94.0

Edited by trids

Share this post


Link to post
Share on other sites



$nRC = FileInstall("D:\Trids\Au3zip\Test.mdb",$sPathDest,1)
You need to add te filename where you want to copy the file to behind the target directory..

$nRC = FileInstall("D:\Trids\Au3zip\Test.mdb",$sPathDest & "\Test.mdb",1)

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Ick! :angry: .. sorry for the hassle!

I misread the helpfile: 0 actually means not cool B)

BTW, JdeB .. if I just append a "\" (with no destination filename) it also works..

$nRC = FileInstall("D:\Trids\Au3zip\Test.mdb",$sPathDest & "\",1)

.. Hmm . now THAT might be useful to put into the help topic :whistle:

Share this post


Link to post
Share on other sites

BTW, JdeB .. if I just append a "\" (with no destination filename) it also works..

.. Hmm . now THAT might be useful to put into the help topic  :whistle:

Learning new features/shortcuts everyday !! B)

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0