Jump to content

DirCopy not working. I wish to copy my PaleMoon profile.


Draygoes
 Share

Go to solution Solved by bordomavi,

Recommended Posts

As stated, I want to automate copying the profile, as I am working on a full Sync system using dropbox, and a bit of code. I know what needs to be  done by hand for this to work, but I would like to automate as much as I can.

Right now though, I am having trouble getting dircopy to work.

:Code Below:

#include <FileConstants.au3>
If ProcessExists( "palemoon.exe" ) Then
    MsgBox( 0, "Problem", "Palemoon is currently running. Please close it and try again." )
    Exit
EndIf
$profile = "C:\Users\Administrator\AppData\Roaming\Moonchild Productions\Pale Moon\Profiles\tt84i0zg.default"
DirCopy($profile, "\profile" )

 

Thank you in advance for your time.

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 
Link to comment
Share on other sites

The last line DirCopy($profile, "profile" ) copies the profile's content into the profile folder.

Replace profile by a full path

I thought that by adding profile would cause the script to understand that I want it to use its directory as the root. I will change it and see if it works though.

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 
Link to comment
Share on other sites

  • Developers

I thought that by adding profile would cause the script to understand that I want it to use its directory as the root

 ... then it should read: "Profile".

"profile" means it will go to "Drive:Profile"

Jos

Edited by 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

Well, I corrected the script with full path added, and it still does nothing.

#include <FileConstants.au3>
If ProcessExists( "palemoon.exe" ) Then
    MsgBox( 0, "Problem", "Palemoon is currently running. Please close it and try again." )
    Exit
EndIf
DirCopy("C:\Users\Administrator\AppData\Roaming\Moonchild Productions\Pale Moon\Profiles\tt84i0zg.default\", "C:\Users\Administrator\Desktop\PaleMoon Sync\profile" )

Once I can get this basic thing working, the rest of the project will be cake. I am automating the process because I am tired of having to do all of this by hand. Grab folder, add to drop box, go to other machine, delete a couple of files from the profile that I am about to plant, erase the profile for the other browser, and copy this over.
The solution I have in mind is basicly a 2 click solution, which I will be testing on a VM before ever using on my main machine.

Also, I should note that I have never used an array before... for anything. So I would have no idea how that would work.

Edited by Draygoes
Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 
Link to comment
Share on other sites

  • Solution

#include <FileConstants.au3>
If ProcessExists( "palemoon.exe" ) Then
    If MsgBox(0x24, "Problem", "Palemoon is currently running. Do you want close and continue?") = 6 Then
        DirCopy(@AppDataDir & "\Moonchild Productions\Pale Moon\Profiles\tt84i0zg.default\", @DesktopDir & "\PaleMoon Sync\profile", 9)
    Else
        Exit
    EndIf
Else
    DirCopy(@AppDataDir & "\Moonchild Productions\Pale Moon\Profiles\tt84i0zg.default\", @DesktopDir & "\PaleMoon Sync\profile", 9)
EndIf

how about this?

Link to comment
Share on other sites

That worked perfectly. I was getting ready to just use a batch script to do this lol.

Thank you all for your help! :thumbsup:

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 
Link to comment
Share on other sites

Project is completed. Basicly, the script to install the backup file is just the one above but in reverse, and it deletes the old profile first. It all works perfectly!!! :thumbsup:

Oh, and I have it backup to my dropbox folder.

If anyone else wants to do this, then there is one more thing that I did that works. I changed the profile name in "profiles.ini" so that it matches on both computers. This way it can go forward and reverse any time I want it to.

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 
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...