• IS THIS SITE UGLY? Click "RG3" at the very bottom-left of this page to change it. To dismiss this notice, click the X --->
Resource icon

Backup your INI's 1.0

For those who change their INI's a lot and may want to revert ... or you just mess around with your INI's a lot, then here's a powershell script that will move them into a dir and zip them up for you. Actually, all your ini's. There probably is a 300$ version of ini back up listed some where out there, but this works. You just need to be able to run powershell scripts on your system.

Right click and select "Run with powershell" and it'll do it's magic. It will make a directory called ini_backup under your macro folder. It should be noted that if some how you have a file with the same name (it uses date, time with seconds) then it will overwrite it inside the backup directory.

You need to place this file into the MACROS folder. (it's inside the zip.. it's a PS1 file for powershell).

Sorry for the prefix; I didn't know which one would be most appropriate.

Code:
Write-Host "Copying INI files into backup folder..." -NoNewLine 
write-host ""

# Test if the path exists
if (-not(test-path -path ini_backup)) {
    New-Item -Path ini_backup -ItemType directory
    Write-Host "Made the backup directory" -NoNewLine
}

# copy the ini's to the backup folder. 
cp *.ini .\ini_backup
cd ini_backup
$datenow = get-date -format MM_dd_yyyy__hh_mm_sstt
$filename = 'inis_'+ $datenow

# compress the ini's into an archive.
Compress-Archive -DestinationPath $filename -Path *.ini -force

# delete all these INI's
rm *.ini

# if you want to see the results you can uncomment these lines below.  Remove the #
#ls
#pause
Author
Thalondor
Downloads
44
Views
52
First release
Last update
Rating
0.00 star(s) 0 ratings
Top