Arma 3 moving files from your editor into the arma 3 folders

I program in vscode, atom & notepad++ depending on how complicated my code will be …

So when testing files in the Eden editor or copying them to the Arma 3 Server for testing with dedicated hosting, I tend to have a lot of other files in the folder I’m working like my .git or .vscode folders.

To avoid packing any of those with pbo manager later – I keep the directory with work version of the mission clear by using the following script.


 

I used the command line tool xcopy, as it’s built into windows

  • I took options `/Y /S /I /U /D`
    • The order might be important here
      • Suppress overwrite message
      • Copies directories and sub directories
      • Assumes dir if failed destination
      • Takes only files that are newer
      • Copies only files that exist in destination

I use a similar script for making copies and changing the name of the files for pushing into a mod versus a mission


Instructions

  • Open the directory with your script you are editing
  • Create a new text file with notepad
    • save it as file_update.bat
    • select yes, you wish to change the file type
      • If you don’t get a warning about changing the file type, you need to enable visible file extensions for your version of window – Link
      • paste the script from the "Actual File" section into the file & save it
  • Change the path to where you want the files and directories to go
    • replace path to arma3 profile with the folder that holds your profile for arma 3 custom mission files you’re editing – Link
    • if not a multiple mission change the mpmissions to missions
    • name of folder holding mission
  • If you are using vscode
    • set .vscode to hidden so the script ignores it
    • you can do this for atom, git & other tool folders too
    • even if you have show hidden folders the script will ignore them
  • Ensure the destination has a copy of all the files you are interested in copying already
  • Go back to the batch file and double click it

Actual file

:: https://stackoverflow.com/questions/47031941/xcopy-overwrite-all-without-prompt-in-batch
:: https://ss64.com/nt/xcopy.html
:: Note don't ever put '::' in code blocks

:: Runs an update of all files in the destination directory & suppresses over write prompt

:: Must place batch file in the directory with the source files

xcopy "*.*" "C:\<path to arma3 profile>\mpmissions\<name of folder holding mission>" /Y /S /I /U /D

:: Note, after you're sure you're happy with it - comment out the pause or remove this section
pause

Sources

https://ss64.com/nt/xcopy.html
https://stackoverflow.com/questions/47031941/xcopy-overwrite-all-without-prompt-in-batch

 

Leave a comment