Is there some way I can get the file permissions for a folder or a file extracted to a file with some command in windows?
for instance:
dir ??? > permissions.txt
If you have at least windows 2003 sp2, then you can use icacls.exe:
icacls.exe [file|folder] > file.txt
you enter file or folder without the brackets, in case it is not clear enough. If you have something older, then you can use setacl, which is a wonderful little tool, but a bit complicated to get started with.
D:AI(A;ID;FA;;;BA)(A;ID;FA;;;SY)(A;ID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)