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.
script: append Win7 file property (title, subject, tags)
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: script: append Win7 file property (title, subject, tags)
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;
}
Re: script: append Win7 file property (title, subject, tags)
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
Thanks
Re: script: append Win7 file property (title, subject, tags)
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.
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)
The valid indices can be seen in the list under Configuration | File Info Tips | Show custom file info tips.
FAQ | XY News RSS | XY X
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: script: append Win7 file property (title, subject, tags)
I tested on a word document file and it was fine.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
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.
Re: script: append Win7 file property (title, subject, tags)
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.
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 (294.67 KiB) Viewed 3178 times
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: script: append Win7 file property (title, subject, tags)
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:
repeat until you find index # for comments and tags.
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>);
XYplorer Beta Club