Jump to content
Macro Express Forums

Extended Properties Of A File


Namino

Recommended Posts

I don't know exactly how to do it for ownership but as a general rule for thigns like this I find a way to do it from a command line and use that command in a Launch command. I then redirect the output of the command to a file. I then pull htat file into a variable and parse out what I need.

 

Someone else could probably give you an easy script to do what you need but I'm not very good at VB Script so if it were me I would use XCACLS from Microsoft ot SetACL with is from a third party. But like I say there's probably a easier way with a VB Script.

Link to comment
Share on other sites

Thanks, that is pretty much how I did it. I just made an AutoIT script to get the owner property and then pass it to ME. Maybe you should try AutoIT as a alternative to VB.

This is all I needed to write in AutoIT to get the Owner property of a file, and then save it to a text file ready for ME to read:

 

 

#include <extprop.au3>
$addressfile = FileOpen("H:\AutoIt\Get Owner property\file address.txt", 0)
$owner_output_file = FileOpen("H:\AutoIt\Get Owner property\owner.txt", 2)
$address = FileReadLine($addressfile,1)
$owner1 = _GetExtProperty($address,8)
$owner2 = StringReplace($owner1,"STARBANK-UK\","")
FileWrite($owner_output_file, $owner2)
;MsgBox(1,"",$owner2)
FileClose($addressfile)
FileClose($owner_output_file)

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...