I've had trouble with the old mapconvert.vbs, so, I created this basic .ps1 (Power Shell) script to merge the _1.txt, _2.txt. and _3.txt EQ map layers into a single map .txt file for MySEQ use.
Place this .ps1 script in one of your EQ maps folders. It will parse the EQ maps then place the new merged "flat map" in a separate folder to not overwrite your current maps.
[CODE title="ConvertMaps.ps1"]# ConvertMaps.ps1 by MacQ
# Merge EQ Map Notes (i.e., _1.txt, _2.txt, and _3.txt files) into one flat .txt map file for MySEQ
$workingDirectory = ".\"
$mapsWithNotes = ".\MapsWithNotes"
If (-not (test-path -PathType container $mapsWithNotes) )
{
New-Item -ItemType Directory -Path $mapsWithNotes
} Else {
$response = Read-Host "$mapsWithNotes Exists -- Do you want to continue? (Y/N)"
If ($response -ne 'Y' -Or $response -ne 'y' ) { Exit }
}
$fileList = Get-ChildItem -Path $workingDirectory -File -Filter *.txt -Exclude *_1.txt, *_2.txt, *_3.txt -Recurse | ForEach-Object { $_.BaseName }
ForEach ($fileName in $fileList) {
Write-Output "Updating - $fileName"
Get-Content $workingDirectory\$fileName".txt" | Set-Content $mapsWithNotes\$fileName".txt"
If (Test-Path -Path $workingDirectory\$fileName"_1.txt") {Get-Content -Path $workingDirectory\$fileName"_1.txt" | Add-Content $mapsWithNotes\$fileName".txt"}
If (Test-Path -Path $workingDirectory\$fileName"_2.txt") {Get-Content -Path $workingDirectory\$fileName"_2.txt" | Add-Content $mapsWithNotes\$fileName".txt"}
If (Test-Path -Path $workingDirectory\$fileName"_3.txt") {Get-Content -Path $workingDirectory\$fileName"_3.txt" | Add-Content $mapsWithNotes\$fileName".txt"}
}[/CODE]
Place this .ps1 script in one of your EQ maps folders. It will parse the EQ maps then place the new merged "flat map" in a separate folder to not overwrite your current maps.
[CODE title="ConvertMaps.ps1"]# ConvertMaps.ps1 by MacQ
# Merge EQ Map Notes (i.e., _1.txt, _2.txt, and _3.txt files) into one flat .txt map file for MySEQ
$workingDirectory = ".\"
$mapsWithNotes = ".\MapsWithNotes"
If (-not (test-path -PathType container $mapsWithNotes) )
{
New-Item -ItemType Directory -Path $mapsWithNotes
} Else {
$response = Read-Host "$mapsWithNotes Exists -- Do you want to continue? (Y/N)"
If ($response -ne 'Y' -Or $response -ne 'y' ) { Exit }
}
$fileList = Get-ChildItem -Path $workingDirectory -File -Filter *.txt -Exclude *_1.txt, *_2.txt, *_3.txt -Recurse | ForEach-Object { $_.BaseName }
ForEach ($fileName in $fileList) {
Write-Output "Updating - $fileName"
Get-Content $workingDirectory\$fileName".txt" | Set-Content $mapsWithNotes\$fileName".txt"
If (Test-Path -Path $workingDirectory\$fileName"_1.txt") {Get-Content -Path $workingDirectory\$fileName"_1.txt" | Add-Content $mapsWithNotes\$fileName".txt"}
If (Test-Path -Path $workingDirectory\$fileName"_2.txt") {Get-Content -Path $workingDirectory\$fileName"_2.txt" | Add-Content $mapsWithNotes\$fileName".txt"}
If (Test-Path -Path $workingDirectory\$fileName"_3.txt") {Get-Content -Path $workingDirectory\$fileName"_3.txt" | Add-Content $mapsWithNotes\$fileName".txt"}
}[/CODE]
Last edited:


