script: append Win7 file property (title, subject, tags)

Discuss and share scripts and script files...
Post Reply
mfu
Posts: 6
Joined: 17 Oct 2012 00:25

script: append Win7 file property (title, subject, tags)

Post by mfu »

script: append Win7 file property (title, subject, tags)

New to scripting. I use Find Files to create a list of files.

Next I want to append to each filename in that Find Files list Win7 file property (subject, title, author, tag). Can someone show a couple examples of scripts to do this?

All help much appreciated.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: script: append Win7 file property (title, subject, tags)

Post by serendipity »

Select some items and use this code :

Code: Select all

    foreach($item, <get SelectedItemsPathNames>, <crlf>){
         $title= property("Doctitle", $item); 
         $subject= property ("Docsubject", $item); 
         $tag= property("#18", $item); 
         rename b, "* $title $subject $tag", $item;
         }

mfu
Posts: 6
Joined: 17 Oct 2012 00:25

Re: script: append Win7 file property (title, subject, tags)

Post by mfu »

Ran script and it appended spaces to the existing filename. Checked Win7 Properties / Details View for each file to confirm that there are values in Title and Tags. Could there be some other xyplorer id for these?

Thanks

highend
Posts: 14639
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: script: append Win7 file property (title, subject, tags)

Post by highend »

Depends on your OS. Properties for files differ from XP to Vista, Win 7 / 8.

Search for properties in this forum. There is a script, that tries to find out, which property exists on your OS.
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 65246
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: script: append Win7 file property (title, subject, tags)

Post by admin »

The valid indices can be seen in the list under Configuration | File Info Tips | Show custom file info tips.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: script: append Win7 file property (title, subject, tags)

Post by serendipity »

mfu wrote:Ran script and it appended spaces to the existing filename. Checked Win7 Properties / Details View for each file to confirm that there are values in Title and Tags. Could there be some other xyplorer id for these?

Thanks
I tested on a word document file and it was fine.
Maybe you can be more specific about what files these are? Like others mentioned here, they could be different.
For a start try this script to find out file properties:
http://www.xyplorer.com/xyfc/viewtopic. ... 562#p71562

edit: I checked on Win7 32-bit OS.

mfu
Posts: 6
Joined: 17 Oct 2012 00:25

Re: script: append Win7 file property (title, subject, tags)

Post by mfu »

Checked with Solidworks and they want me to run a File Manager Utility. My strong preference is to create list with one tool / utility / script.

Pls see attached pic showiing details view in XYP and Win7. Comments & Tags manually added to file in XYP are not visible in Win7 details view. And, similar properties added to files in Win7 and in Solidworks are not visible in XYP.

I am thinking there must be a way to get to all these file properties somehow. End state is a list with filename and all properties for each file in the search results.

Any other ideas using XYP would be helpful. Thx.
Attachments
xyplorer props1.JPG
xyplorer props1.JPG (294.67 KiB) Viewed 3176 times

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: script: append Win7 file property (title, subject, tags)

Post by serendipity »

I might have misunderstood your original post.
Comments and tags from Windows 7 will not show up in XYplorer's comments and tags and the other way around because they are not compatible with each other. XY has its own way to tag files (tagging in XY means Labels, Comments and Tags).
But if you want to import tags and comments from windows into XY's tags and comments you can use the XY's scripting command "property" combined with command "tag". But before that you have to know the index name/number for comments and tags for your file extension file slddrw.
As previously mentioned you can use this script to quickly determine that:
http://www.xyplorer.com/xyfc/viewtopic. ... 562#p71562

A slower/manual method would be to select your file and type this in the addressbar to get index #1:

Code: Select all

::text property ("#1",<curitem>);
repeat until you find index # for comments and tags.

mfu
Posts: 6
Joined: 17 Oct 2012 00:25

Re: script: append Win7 file property (title, subject, tags)

Post by mfu »

Thx.

Post Reply