ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   file owner properties (https://www.excelbanter.com/excel-programming/417666-file-owner-properties.html)

Funtime

file owner properties
 
I know xcacls.vbs can be used to change file permissions. Is there a similar
tool to change file ownership?

Sean Timmons

file owner properties
 
If you just want to change the name of the owner and such, go to File then
Properties.

"Funtime" wrote:

I know xcacls.vbs can be used to change file permissions. Is there a similar
tool to change file ownership?


Funtime

file owner properties
 
I guess I did not put enough detail into my question. Sean highlights
exactly what I am trying to do in a very simple manual command.
I am trying to write a vba script for excel that will search through various
directories on my server, and selectively change the "owner" property of
individual files and folders. My reference to xcacls is an analogy to my
situation. I use the same search programing today and execute the xcacls.vbs
command in a shell to manipulate the files permissions property. Xcacls does
not control the ownership.

"Sean Timmons" wrote:

If you just want to change the name of the owner and such, go to File then
Properties.

"Funtime" wrote:

I know xcacls.vbs can be used to change file permissions. Is there a similar
tool to change file ownership?


Peter T

file owner properties
 
Not sure what you mean by "ownership", author perhaps. If so, install
dsoFile
http://support.microsoft.com/kb/224351/en-us

Sub test()
' Tools/refs DSO OLE Document Properties Reader
Dim sFile As String
Dim sAuthorOrig As String
Dim sAuthorNew As String

sAuthorNew = "Funtime"
Dim dso As DSOFile.OleDocumentProperties
Set dso = New DSOFile.OleDocumentProperties

' some loop here
sFile = "C:\temp\book1.xls"

dso.Open sfilename:=sFile
' sAuthorOrig = dso.SummaryProperties.Author
dso.SummaryProperties.Author = sAuthorNew
dso.Save
' end loop

dso.Close

End Sub

Regards,
Peter T


"Funtime" wrote in message
...
I know xcacls.vbs can be used to change file permissions. Is there a
similar
tool to change file ownership?





All times are GMT +1. The time now is 09:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com