Jump to content

DirMove


Recommended Posts

Hello,

I am currently writing a bootstrapper for an auto-update application. However, DirMove is for some reason returning 0 (which I know means it is non-successful.) Both paths provided are valid. Here is the code I use:

$ResInt = DirMove(@ScriptDir, $location, 1)

I am basically trying to move everything from where the script is running (where my contents from the auto-updater are) to a location that I passed through an argument. The only thing I could think of was that it was trying to move the AutoIt executable itself. If this is the case, what do you think is the best way to go about moving these files? (I do have sub-folders that need copying)

Thank you very much for your help in advance.

Link to comment
Share on other sites

ascripter9050,

I doubt you can move a folder that your program is running in at the same time.

Run your program outside of the folder you want moved - and call the correct path.

If DirMove('C:\SomeFolder', 'C:\ToSomeOtherFolder', 1) Then MsgBox(8256, '', 'Success')

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Link to comment
Share on other sites

Hi Everyone,

Thanks for the reply. I just have one more question:

Right now, I have a folder called updater. When I run DirMove(), it moves the test folder (so we now have updater/test). Is there a way where I can just move the contents of this folder? For example, let's say we had a file called blah.exe in test. I'd like to have the path updater\blah.exe and not updater\test\blah.exe

Thanks!

Link to comment
Share on other sites

Hi Everyone,

Thanks for the reply. I just have one more question:

Right now, I have a folder called updater. When I run DirMove(), it moves the test folder (so we now have updater/test). Is there a way where I can just move the contents of this folder? For example, let's say we had a file called blah.exe in test. I'd like to have the path updater\blah.exe and not updater\test\blah.exe

Thanks!

Look at _FileListToArray()

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...