ascripter9050 Posted January 18, 2011 Share Posted January 18, 2011 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 More sharing options...
DCCD Posted January 18, 2011 Share Posted January 18, 2011 copy your file.exe to %temp% then launche, inside your file.exe if @ScriptDir = %temp% = true then start DirMove func [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
ripdad Posted January 18, 2011 Share Posted January 18, 2011 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 More sharing options...
ascripter9050 Posted January 18, 2011 Author Share Posted January 18, 2011 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 More sharing options...
Zedna Posted January 18, 2011 Share Posted January 18, 2011 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.exeThanks!Look at _FileListToArray() Resources UDF ResourcesEx UDF AutoIt Forum Search 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