HenDaBen.Com

Home
About
Gallery
Blog
News
Downloads
Services
Contact
Home
About
Gallery
Blog
News
Downloads
Services
Contact

How to easily deploy files

31.3.2026 by HenDaBen

Deploy small

I came across a problem in SnowRunner (yes I finally got it after completing MudRunner and Spintires 100%) as every time I quit the game, all my precious settings would be erased. Like a wet rag to my face I was clueless what to do.

I found out that the same bug appeared like six years ago to someone, and SnowRunner devs told him to make a ticket to get it fixed. I guess it never got fixed as I'm here to experience this feature yet again.

In the screenshot below you can see a script being executed. The script simply copies files from location a to b

Powershell

Let's Powershell!

Powershell should be available on all Windows. No matter what your edition you're running. I used to do some PowerShell scripting some time ago and I had this one thing in my mind. What about a icon on your desktop - just doubleclick it and the settings are applied.

And that's what this blogpost is about!

Deploy Files

First thing to do is get the file you need to deploy - in my case it is a config (config.CFG) file. Here's the actual script:

$sourceFile = "C:\Users\henri\Documents\Testhtml\hdbcom\v200\2026\deploy\filesToDeploy\user_profile.CFG" $destinations = @( "C:\Users\henri\Documents\Testhtml\hdbcom\v200\2026\deploy\filesToDeploy\deployedFiles" ) foreach ($dest in $destinations) { #existing if (-Not (Test-Path $dest)) { Write-Host "Creating folder: $dest" New-Item -ItemType Directory -Path $dest -Force } #copykat $destinationFile = Join-Path $dest "user_profile.CFG" Copy-Item -Path $sourceFile -Destination $destinationFile -Force Write-Host "Files moved to $destinationFile" } Write-Host "All files moved."

Now in this script you should replace the path on line 1 and 3. Also, the name of your file to which is copied on line 12 needs to be renamed.

For newbies, below is a screenshot of File Explorer, what and where happens.

Windows File Explorer

When the powershell script is executed, the user profile file gets deployed from filesToDeply folder to deployedFiles folder. Simple!

Remember - right click your script and send it to desktop. Then you can just run it easily from there until your bug is fixed.

USB deploying

To easily deploy folders from your PC to an USB-stick (which would be mounted as D: in this example, just use this:

$sourceFolders = @( "C:\Users\Admin\Scripts\Arma_WP", "C:\Users\Admin\Scripts\ETS_CFG", "C:\Users\Admin\Scripts\CSGO_PROFILE" ) $destinationRoot = "D:\Scripts\myDepolyedFoldersFromPC" foreach ($source in $sourceFolders) { $folderName = Split-Path $source -Leaf $destPath = Join-Path $destinationRoot $folderName if (-Not (Test-Path $destPath)) { Write-Host "Creating folder: $destPath" -ForegroundColor Yellow New-Item -ItemType Directory -Path $destPath -Force | Out-Null } Copy-Item -Path $source\* -Destination $destPath -Recurse -Force Write-Host "Copied $folderName -> $destPath" -ForegroundColor Green } Write-Host "'nFolders moved to USB-stick" Read-Host "Press Enter to continue.."

Of course you have to rename the correct paths for your needs on line 2, 3, 4 and 7.

Wen you have the folders on your USB-stick, to easily deploy them to other PC, just use this:

$sourceFolders = @( "D:\Scripts\Arma_WP", "D:\Scripts\ETS_CFG", "D:\Scripts\CSGO_PROFILE" ) $destinationRoot = "C:\Users\Admin\myDeployedFoldersFromUSB" foreach ($source in $sourceFolders) { $folderName = Split-Path $source -Leaf $destPath = Join-Path $destinationRoot $folderName if (-Not (Test-Path $destPath)) { Write-Host "Creating folder: $destPath" -ForegroundColor Yellow New-Item -ItemType Directory -Path $destPath -Force | Out-Null } Copy-Item -Path $source\* -Destination $destPath -Recurse -Force Write-Host "Copied $folderName -> $destPath" -ForegroundColor Green } Write-Host "'nFolders copied to PC" Read-Host "Press Enter to continue.."

Again, remember to use your actual folders and paths on line 2, 3, 4 and 7.

While having a USB stick with all your profiles or scripts as ready-to-go, this actually helps you if you swap computers often. Also, once you add the folders from your PC to the script - they always get copied along other folders.

Git Bash deploy list

Git Bash UI, listing items

Please note

Don't download and run random powershell scripts if you don't know what they do. It could end up in loss of valuable data.

If your PowerShell refuses to run scripts (even via Admin), make a new powershell script (or just type it in powershell) with the following code:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine -Force

The code above actually enables powershell scripting overall.

Also, you can use PowerShell ISE editor to create more scripts, it is just like any IDLE or IDE software.

Changelog



Latest News and Blogs

Recent acitivity

ETS2 MP
ETS2 MP
Cinebench
Cinebench
Website update
Visual Update
WoW Classic
Level 60 in WoW C!
OSRS UIM 5
UIM progress
Old School RuneScape
Say Wc 99!