AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FileGet/Set or FileGetProperties
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Thu Dec 01, 2005 5:12 pm    Post subject: FileGet/Set or FileGetProperties Reply with quote

As I'm researching to get the comments from the file properties, I came by this request on the todo list.
Quote:
New command FileGet/Set or FileGetProperties to retrieve and set things from a file's property sheet (title, author, permissions, etc.)


Any chance to increase priority and get this feature anytime soon?
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10450

PostPosted: Fri Dec 02, 2005 3:16 am    Post subject: Reply with quote

It probably won't happen soon because it's unfamiliar territory for me, and thus requires more R&D. Maybe there's some way to do it with DllCall.
Back to top
View user's profile Send private message Send e-mail
freakkk as guest
Guest





PostPosted: Sat Dec 03, 2005 4:16 am    Post subject: Reply with quote

I know you were looking to get comments/author-- but if you need to get/set permissions- you can you use cacls..
Quote:
C:\>cacls
Displays or modifies access control lists (ACLs) of files

CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user [...]] [/P user:perm [...]] [/D user [...]]
filename Displays ACLs.
/T Changes ACLs of specified files in the current directory and all subdirectories.
/E Edit ACL instead of replacing it.
/C Continue on access denied errors.
/G user:perm Grant specified user access rights. Perm can be: R Read W Write C Change (write) F Full control
/R user Revoke specified user's access rights (only valid with /E).
/P user:perm Replace specified user's access rights. Perm can be: N None R Read W Write C Change (write) F Full control
/D user Deny specified user access.
Back to top
Serenity



Joined: 08 Nov 2004
Posts: 700

PostPosted: Fri Dec 16, 2005 7:20 pm    Post subject: Reply with quote

I'd like to be able to read/write file metadata (eg. fields in the File Properties/Summary tab) with AutoHotkey.
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10450

PostPosted: Sat Dec 17, 2005 4:56 am    Post subject: Reply with quote

This has been requested in other topics too. What would help is a demo script that achieve it via DllCall so we can learn from someone how to do it Smile.

But in case no one knows how to do it, it's still on the to-do list to do some R&D .
Back to top
View user's profile Send private message Send e-mail
shimanov



Joined: 25 Sep 2005
Posts: 612

PostPosted: Sat Dec 17, 2005 8:25 am    Post subject: Reply with quote

There seems to be two [documented] methods for accessing the data stored in an NTFS file stream:

Code:

CreateFile( "d:\\unknown.bin:DocumentSummaryInformation:$DATA", FILE_ALL_ACCESS, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0 )
...
ReadFile( h_file, buffer, buffer_size, &buffer_actual, 0 )


or

Code:

; load all streams, attributes, etc.
BackupRead( h_file, (BYTE*) buffer, buffer_size, &buffer_actual, false, false, &context )


However, I have not located a reference to specify the format of the retrieved data. Technically, it can contain any kind of content. The standard "Summary" properties seem to be stored in a database format (i.e., header, records, data), which can be interpreted through heuristic means -- assuming it is the same across Windows platforms.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10450

PostPosted: Sun Dec 18, 2005 4:27 pm    Post subject: Reply with quote

That's a great starting point. Thanks for posting it.
Back to top
View user's profile Send private message Send e-mail
shimanov



Joined: 25 Sep 2005
Posts: 612

PostPosted: Sun Dec 18, 2005 9:25 pm    Post subject: Reply with quote

Chris wrote:
That's a great starting point. Thanks for posting it.


Sure.

To clarify. The character between "bin:" and "Document" is ASCII code 0x5, not a pipe (|) character.
Back to top
View user's profile Send private message
kinda_lost
Guest





PostPosted: Fri Jan 20, 2006 1:51 am    Post subject: Reply with quote

Hi..Found this thread while searching forum...i also would like to set a file's metadata w/ ahk.

Reason: I use iTunes which displays info based on the metadata of a song file. I'd like to use AHK to rename all the info in the file's properties (properites>>summary>>advanced)

Any progress with this yet? still on Do-to-list, or has this already been accomplished?
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10450

PostPosted: Sat Jan 21, 2006 1:59 am    Post subject: Reply with quote

It's still on the to-do list. Shimanov's post above will probably be helpful when the time comes. If anyone wants to continue the research, perhaps you can use that info.
Back to top
View user's profile Send private message Send e-mail
raven-gm



Joined: 25 Mar 2007
Posts: 24

PostPosted: Fri Apr 13, 2007 10:06 pm    Post subject: Reply with quote

I could really use this command...
I don't have much programming experience (mostly actionscript, ahk, and ti-92), but is there any way I could do some sort of data collection project on this for someone who actually knows what they're doing?
_________________
I would like to think that I know what I'm doing, but there's just to much stuff I've yet to learn...
Back to top
View user's profile Send private message AIM Address
majkinetor



Joined: 24 May 2006
Posts: 3544
Location: Belgrade

PostPosted: Sat Apr 14, 2007 12:36 am    Post subject: Reply with quote

This can be done via COM and IPropertyStorage interface.

Reference
http://msdn2.microsoft.com/en-us/library/aa379968.aspx


Maybe somebody of "COM programmers" can give ya a hand.

This can also be handy
http://mail.python.org/pipermail/python-win32/2003-June/001107.html
_________________
Back to top
View user's profile Send private message MSN Messenger
Tekl



Joined: 24 Sep 2004
Posts: 808
Location: Germany

PostPosted: Tue Apr 17, 2007 11:02 am    Post subject: Reply with quote

Any news on how to set access rights with AHK?

CACLS is no solution as it is language dependent: http://www.autohotkey.com/forum/viewtopic.php?t=17641&highlight=aappdatacommon
_________________
Tekl
Back to top
View user's profile Send private message Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 3544
Location: Belgrade

PostPosted: Tue Apr 17, 2007 12:24 pm    Post subject: Reply with quote

I am sure it can be done via COM
You should search VB scripts as those contain the largest number of such examples.
_________________
Back to top
View user's profile Send private message MSN Messenger
Tekl



Joined: 24 Sep 2004
Posts: 808
Location: Germany

PostPosted: Tue Apr 17, 2007 1:35 pm    Post subject: Reply with quote

I don't want to use VB Scripts or have I missed the AHK supports COM?
_________________
Tekl
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group