Script to Copy Specific SBML Models in SBW Test Suite
Once you download the SBML models from SBW Test Suite, they come up in sub directories and it is not easy to feed them into other platforms. The following Powershell script copies specific SBML version of models in test suite into one directory.
#Copy all the matching SBML files according to $sbmlVersion under $dir into $copyDir.
$dir = 'C:\Users\sarp\Desktop\sbml-test-cases-2011-06-15\cases\semantic\'
$copyDir = 'C:\Users\sarp\Desktop\sbml-test-cases-2011-06-15\'
$sbmlVersion = '-sbml-l2v4.xml'
Get-ChildItem $dir | ForEach-Object{
$fileToCopy = ($dir + $_.name + '\*' + $sbmlVersion)
Copy-Item $fileToCopy $copyDir
}
Comments