/ Published in: Windows PowerShell

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
param ($path, $urlpath) $files = Get-ChildItem -path $path -filter *.jpg | Select-Object Name Write-Output "<?xml version=""1.0"" encoding=""utf-8"" standalone=""yes""?>" Write-Output "<images>" foreach ($file in $files) { $n = $file.Name "<pic><image>$urlpath/$n</image><thumbnail>$urlpath/thumbs/$n</thumbnail><caption>$n</caption></pic>" } Write-Output "</images>"
Comments
