#How to convert .psf to .ps1
1 messages · Page 1 of 1 (latest)
Yes, i was looking for an option outside of powershell studio. But i guess i could just use a Trail lizenz on a different PC to export it the way you suggested. Thx
Ah sorry, i missed that part. I guess once you have an example it would probably not be hard to build a code generator for that
PSF files are just xml, try:
# parse psf document
[xml]$psfDoc = Get-Content path\to\project.psf
# find <code /> nodes
$codes = $psfDoc.SelectNodes('//code')
# output their textual contents
$codes |ForEach-Object {
$_.InnerText
}
Awsome thanks! Ill try it later :)
This only extracts embedded code though, you'd need a bit more to also extract and recreate the form elements
Take a look at the psf file in a text editor 🙃
What could i do to get the form Elements?
I'm not familiar enough with their schema to be able to tell, you'll have to work that out on your own
I looked at it in the editor and its not readable code
It is, it likely just have lots of Base64 encoded blocks of binary data (which propbably takes up 90% of the lines in your editor)
A dedicate XML editor might be more helpful
if you are comfortable sending me the psf, I can export it for you
I'm also happy to take a look at it if you want any pointers re: figuring out how to parse the whole project file as xml
can you post a sample?