| View previous topic :: View next topic |
| Author |
Message |
toralf
Joined: 31 Jan 2005 Posts: 3842 Location: Bremen, Germany
|
Posted: Thu Dec 01, 2005 5:12 pm Post subject: FileGet/Set or FileGetProperties |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10450
|
Posted: Fri Dec 02, 2005 3:16 am Post subject: |
|
|
| 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 |
|
 |
freakkk as guest Guest
|
Posted: Sat Dec 03, 2005 4:16 am Post subject: |
|
|
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
|
Posted: Fri Dec 16, 2005 7:20 pm Post subject: |
|
|
| I'd like to be able to read/write file metadata (eg. fields in the File Properties/Summary tab) with AutoHotkey. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10450
|
Posted: Sat Dec 17, 2005 4:56 am Post subject: |
|
|
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 .
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 |
|
 |
shimanov
Joined: 25 Sep 2005 Posts: 612
|
Posted: Sat Dec 17, 2005 8:25 am Post subject: |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10450
|
Posted: Sun Dec 18, 2005 4:27 pm Post subject: |
|
|
| That's a great starting point. Thanks for posting it. |
|
| Back to top |
|
 |
shimanov
Joined: 25 Sep 2005 Posts: 612
|
Posted: Sun Dec 18, 2005 9:25 pm Post subject: |
|
|
| 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 |
|
 |
kinda_lost Guest
|
Posted: Fri Jan 20, 2006 1:51 am Post subject: |
|
|
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
|
Posted: Sat Jan 21, 2006 1:59 am Post subject: |
|
|
| 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 |
|
 |
raven-gm
Joined: 25 Mar 2007 Posts: 24
|
Posted: Fri Apr 13, 2007 10:06 pm Post subject: |
|
|
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 |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3544 Location: Belgrade
|
|
| Back to top |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 808 Location: Germany
|
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3544 Location: Belgrade
|
Posted: Tue Apr 17, 2007 12:24 pm Post subject: |
|
|
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 |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 808 Location: Germany
|
Posted: Tue Apr 17, 2007 1:35 pm Post subject: |
|
|
I don't want to use VB Scripts or have I missed the AHK supports COM? _________________ Tekl |
|
| Back to top |
|
 |
|