Jump to content

Copy 1 File to multiple Locations


Recommended Posts

Hello Dreamore,

I honestly meant no disrespect (originally that is... you tweaked my nerves after a bit), but I hope now you understand I mostly just wanted to make sure that by answering your question... I wasn't myself violating the forum rules. Took us a moment to understand exactly what you were doing (and why), because from what I've read nobody else here, including myself, plays that or is familiar with it. 

As I said before, I'd still like to help you out. A mod has approved your question doesn't break any rules, so lets just erase everything up until now.

I couldn't find the original code I typed up, but I went ahead and typed up another version as promised.

I don't have a true way of testing it, since I have none of those files or the directory structure even. I did comment out all of the code, with little explanations along the way, so if you see and error in my logic or understand of the problem.... even without fully understanding the code you can help me point you in the right direction.

(Though I implore you to take the time to learn what it all means, and do please... feel free to ask questions.)

The arrays will look a little neater once pasted into SciTE.

#RequireAdmin
#Include <Misc.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
Local $CPYFrom = "C:\Users\"&@USERNAME&"\AppData\Local\CCP\EVE\c_program_files_(x86)_steam_steamapps_common_eve_online_tranquility\settings\Perfect_Char.dat"
Local $CPYTO = "C:\Users\"&@USERNAME&"\AppData\Local\CCP\EVE\c_program_files_(x86)_steam_steamapps_common_eve_online_tranquility\settings\"
 ;Now, I kept these the same... Except I changed what is now '@USERNAME', from whatever it was before because I assumed you meant this. So, double check it.
 
;27 total entrys
Local $charData[28] = ["Core_char_238860089.dat", "Core_char_1360360344.dat", "Core_char_90897006.dat", "Core_char_91053142.dat", "Core_char_91053142.dat", _
                     "Core_char_92507638.dat", "Core_char_92507641.dat", "Core_char_92507660.dat", "Core_char_92507667.dat", "Core_char_92507669.dat", _
                     "Core_char_92558256.dat", "Core_char_92558268.dat", "Core_char_92558274.dat", "Core_char_92558281.dat", "Core_char_92558285.dat", _
                     "Core_char_828378769.dat", "Core_char_92772994.dat", "Core_char_93502564.dat", "Core_char_93515324.dat", "Core_char_93515336.dat", _
                     "Core_char_93515338.dat", "Core_char_93515345.dat", "Core_char_93515351.dat", "Core_char_93515363.dat", "Core_char_93515377.dat", _
                     "Core_char_93515383.dat", "Core_char_93519925.dat", "Core_char_1421284591.dat"]
;This is an example of the use of Arrays.

;Here's other ways the values can be used: 
;MsgBox(0, "Test", $charData[0]) would return "Core_char_238860089.dat"... (the first entry)
;MsgBox(0, "Test", $charData[27]) would return "Core_char_1521284591.dat"... (the last entry)
;

;So, cycling 0-27 would go through each one right? We'll see :). Lets make one just like it for the User Data files.

;27 total entrys
Local $userData[28] = ["Core_user_124948.dat", "Core_user_268939.dat", "Core_user_7912202.dat", "Core_user_8033857.dat", "Core_user_9278725.dat", _
                     "Core_user_9278728.dat", "Core_user_9278879.dat", "Core_user_9278730.dat", "Core_user_9278732.dat", "Core_user_9323622.dat", _
                     "Core_user_9323623.dat", "Core_user_9323626.dat", "Core_user_9323627.dat", "Core_user_9323631.dat", "Core_user_8060698.dat", _
                     "Core_user_9509019.dat", "Core_user_10066093.dat", "Core_user_10146015.dat", "Core_user_10146019.dat", "Core_user_10146020.dat", _
                     "Core_user_10146022.dat", "Core_user_10146024.dat", "Core_user_10146026.dat", "Core_user_10146028.dat", "Core_user_10146029.dat", _
                     "Core_user_10146031.dat", "Core_user_10146032.dat"]
;Same as above! Just with your user dat files.


; Both arrays have the same number of files, thus... we can do both in 1 loop. 
For $var = 0 To 27; This will add +1 to $var (which as you see starts at 0, the first piece in the array)... each time it runs, until reaching 27 (the specified stopping point.)
  
   FileCopy($CPYFrom, $CPYTO&$charData[$var], 1); Copys (FROM, TO, 1 = OVERWRITE)
   FileCopy($CPYFrom, $CPYTO&$charData[$var], 1); Copys (FROM, TO, 1 = OVERWRITE)
   If @Error Then ; For testing purposes. Always good to have some error handling.
      MsgBox(0, "Error", "Something wrong with the directory structure.")
      MsgBox(0, "Copy FROM", $CPYFrom)
      MsgBox(0, "Copy TO", $CPYTO&$charData[$var])
   EndIf
Next

Run ('"C:\Program Files (x86)\InnerSpace\InnerSpace.exe" run isboxer -launch "Eve-Online (16 Acounts)"',"C:\Program Files (x86)\InnerSpace")

EDIT: Somehow my code got chopped... Re-entered it.

Edited by Andreu
Link to comment
Share on other sites

  • Moderators

Andreu,

Excellent beginning to your post - just the sort of attitude we want to see here. Thanks. :thumbsup:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

Clark,

Thanks for posting, but your link does not really add anything new. We all know that the various apps mentioned are used to bot games - the point is that in this particular case, the script does not interact with the game per se and is just updating files. A fine distinction, but one that I think is worth making. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

Clark,

Read my lips! :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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