Created
March 23, 2012 10:38
-
-
Save cajones/2169460 to your computer and use it in GitHub Desktop.
Powershell script to flatten a folder structure from Adobe Captivate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param($directoryToFlatten = '.', $scormSubDir = 'SCORM_support') | |
$supportDir = "$directoryToFlatten\$scormSubDir" | |
if((Test-Path $supportDir)) { | |
mi "$supportDir\*.*" $directoryToFlatten | |
ri $supportDir | |
Write-Host 'Support files moved...' | |
} | |
$htmlContent = gc "$directoryToFlatten\sco.htm" | |
$htmlContent |% { $_ -replace "$scormSubDir/", "" } | sc "$directoryToFlatten\sco.htm" | |
Write-Host 'HTML content updated...' | |
$xmlContent = gc "$directoryToFlatten\imsmanifest.xml" | |
$xmlContent |% { $_ -replace "$scormSubDir/", "" } | sc "$directoryToFlatten\imsmanifest.xml" | |
Write-Host 'XML content updated...' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment