Insert Filename into IPTC Title metadata
Good Morning,
I am wondering if there is a way to insert the filename of an image into the IPTC title metada.
Below is an example of our file name system.
(ex. YYMMDD-M-TI822-001)
The only part that changes is the 3 digit number at the end.
How would I go about writing a script to have Bridge automatically do it or is there one already writen that I can download and use?
Thank you for your help.
Change:
md.Title = thumb.name;
To:
md.Title = decodeURI(thumb.name).replace(/\.[^\.]+$/, '');
Similar Messages
-
Filename to IPTC Title, but without extension. (Currently using DAM script)
Hello,
Apologies if this isn't the correct forum to ask this question:
I am currently using the DAM Filename to Title script with Bridge CS4 - http://www.damuseful.com/pages/PimpMyBridge.html - to get the filename into the IPTC title script. This however puts in the extension into the title field also. So a JPG file named 2000 ends up with 2000.JPG in its Title field. I wish to not have the extension appear in the Title field.
Is this possible by modifying the DAM script / using any other freely available script.
In case it helps, this is what the DAM script currently looks like:
#target bridge
if ( BridgeTalk.appName = "bridge" )
//This script copies selected thumbnails' filenames to the title field
//Also shows how to add menu items
//The AdobeLibrary scripts must be loaded
//This script was created by John Beardsworth www.beardsworth.co.uk/ and modified by Peter Krogh www.DAMuseful.com
//This script may be freely distributed and modified
// Let's create our menu
var menu = MenuElement.create( "command", "Write Filename to IPTC Title Field", "at the end of Tools");
menu.onSelect = function(m)
var getFolderChildren = true ;
var filesOnly = true ;
var thumbs = getBridgeThumbnails ( TYPES.PHOTOSHOP_OPENABLE, getFolderChildren, filesOnly) ;
for ( var i = 0; i < thumbs.length; i++ )
{ thumb = thumbs[i];
md = thumb.synchronousMetadata;
md.namespace ="http://ns.adobe.com/photoshop/1.0/";
md.Title = thumb.name;
Window.alert ("Done " + i + " records");
There are also 3 other Adobe Library scripts that come with the download.
I know absolutely nothing about scripting, so baby-steps would be appreciated.
Many thanks.Change:
md.Title = thumb.name;
To:
md.Title = decodeURI(thumb.name).replace(/\.[^\.]+$/, ''); -
No longer able to insert filename into a document in the new pages
Does anyone know if the ability to insert the filename into the document has been eliminated or if we just have to get to it another way? Used to be able to go to INSERT>FILENAME but that seems to have disappeared.
Thanks
AJIt does cause problems in a number of circumstances.
In this forum alone, there are several threads with many users who used Setup Assistant or Migration Assistant to transfer their stuff, ended up with lots of duplicate apps because of it, and had great difficulty finding and deleting the duplicates.
There have also been folks whose apps did't get updated, and Adobe apps that wouldn't run at all.
Again, it depends on the apps and circumstances. -
Inserting Filename into Header/Footer
Hi everyone,
I'm looking for a way to enter the filename (without the file extension) into the header of my document. From the research I've been doing it seems the only way to do this would be to write some sort of javascript, or pay for a 3rd party plug-in with a ton of features I'll never need or use. You would think Adobe would have made this pretty simple to do, it seems I've seen a lot of people asking for it for various reasons.
Is there a simple way to do it? Or am I totally out of luck. I was hoping to be able to do it for batch processing, but I think my options are limited, as it seems the only way might be to write a javascript and insert that into the batch processing process.
Thanks.Yeah I'm looking for a way to do it in batch automaticaly. I could do it manually but I have potentialy thousands of documents.
I don't know how to write javascript so would there be an easy way of creating a script? -
Bulk insert files into sharepoint with metadata
Hello everyone,
I am creating an application which will migrate about 16k documents and their metadata from a legacy system to SharePoint.
I got the extract of the legacy system in a way that I have a folder containing the document (pdf file) and an xml file with the metadata per document.
I created the whole thing to be able to do the upload and it works fine, but on the other hand it is damned too slow...
I splited the operations, first I upload all the files and then I update the metadata of the files. I also splited the files in batches of 1000 items.
The file uploading takes more time as the list is filled. At the beginning I needed 15 mins for 1000 files, now that the list has already 3000 files in there, it takes about an hour...
I do check if the file already exists before uploading it because I need to report an error if the file was already in the list (duplicates detection)
Is there anyway to improve the performance of the system?
I also have another issue which is the fact my tool to migrate the files is taking more RAM as the list grows. After the 5000th file my tool is using over 1GB of RAM. Could it be because I use a single SPSite instance for the whole upload? Should I recreate
it during the upload?
Here is the code I use in order to upload the files:
using (var web = _currentSite.OpenWeb())
var library = web.GetList(libraryName);
var relativeFileUrl = string.Format("{0}/{1}", library.RootFolder, fileName);
if (web.GetFile(relativeFileUrl).Exists)
throw new InvalidOperationException(string.Format("The file '{0}' already exists", fileName));
var file = web.Files.Add(relativeFileUrl, fileStream, false);
Thanks a lot for your help!
With kind regards
CarlosHi,
So after a lot of digging the logs and so on, my application was not responsible of the lag on the upload.
Basically the list I was uploading to was using an event receiver which had a memory leak and was not using the most performant methods in order to retrieve data etc...
The lags came from the event receiver. Shame is I was the one who developped the event receiver hahaha :)
Anyway, once the event receiver was fixed, I got much better results for the upload and an upload speed of about 600 files per 10 mins which is totally acceptable for me!
I also learned in the way the two following facts that might interest people in this situation:
Event receiver code is loaded in the context of the console application process doing updates to the list. I thought at first the event receiver would be called in a RPC fashion and would live in the web application process. My mistake :)
My event receiver is responding to the ItemAdded and ItemUpdated events which are assynchronous. Once the console application ends its processing, it shuts down all the threads created by the event receiver even if they did not ended their work!
As there is no way to check if the event receiver ran or not in the code, and after searching on the web for a couple of hours, the only way to solve this is to put a Thread.Sleep at the end of the console application in order to let the event receiver thread
pool threads finish their work and avoid killing them.
Normally the wait time should not be too long except if the event receiver is really doing an heavy job or suffers of a huge memory leak (sounds familiar... :p)
Hope this will help others solving their issues. -
Inserting current pathname and filename into Pages documents?????
Pages help explicitly says you can put "filenames" and "pathnames" into formatted text fields just as you can put in page numbers and the date. It does NOT tell you how to do this!!! What do I type so that my current pathname appears in pages? Or the current filename of my document?? I am trying to create a template so that filename, pathname, date, and number of pages always appears in the header.
Well, it is possible to automatically insert the document's filename into the header as I routinely do it in (dare I say) Microsoft Word and Microsoft Excel. I write many documents long and short. For each of them I start with the same template, one that includes the filename and the date "last saved" in the header.
Those who have an ironclad hierarchy where every file is unambiguously filed into one folder might easily be able to retrieve every file. For me, it is very useful to know the filename of the document I am searching for (as it is on my hardcopy) and to know that it is "sept-mon-rpt-final" and not "sept-mon-rpt-mikes-edits". As my example suggests, the greatest utility of this is for version control.
I do not want to type my filename into every draft document, I want them to insert themselves in the header in the same manner that Pages inserts the current date. This information, filename and pathname, is in the Mac system. Indeed, there is a reference to it in the Pages documentation.
In Pages'08 Help - the page titled: "Working with Document Parts" under "using Headers and Footers" it says, "Add headers and footers to give your documents page-by-page identity by showing the date and time, page number, or filename and pathname."
When you click on the link that says "Using Headers and Footers" you are taken to that page, where it says, "you can put your own text or graphics in a header or footer, and you can use formatted text fields. Formatted text fields allow you to insert text that is automatically updated. For example, inserting the date field shows the current date whenever you open the document. Similarly, page number fields keep track of page numbers as you add or delete pages."
After this you hit a dead end. -
Inserting filename and page numbers into multiple PDF files?
Have since seen this thread, BUT still interested in the syntax of the code
to insert filename and page # into multiple files:
http://forums.adobe.com/thread/951925?tstart=0
Good Evening (GMT!)
I have approx 100 PDFs with one or two pages in each, they are English translations
of Russian language test certificates and the formatting/feel of the originals is lost in
the translations. The only real link between the two sources is the "_RUS" and "_ENG"
filename suffixes and the common leading filenames otherwise. Thus I need to maintain
a record of the filename in any page I print off, should there be a need to refer back to
the original if the translation is open to artistic licence.
I have a script (below) that happily adds a page x/y and filename into the active file,
what I would like is to be able to do this insertion into multiple files as defined by a
portfolio or a selection via a select files dialogue box
I am quite out of my depth now as my past skirmishes with JavaScript have set
cookies and tweaked a few other browser doodads in webauthoring
Any help most appreciated on this one...
Kind Regards
Dr B
Southampton
UK
NB the filename inserted may be corrupted as a result of my last tweakings
will sort that one out ASAP....
================================
// SetRemoveFooter
// Modified as marked
// Menu item generation
app.addSubMenu({ cName: "Footer",cUser: "Set/Remove Complex Footer", cParent: "File", nPos: 20 });
app.addMenuItem({ cName: "Set Filename", cParent: "Footer", cExec: "SetFooter(1)"});
app.addMenuItem({ cName: " -> Set Date .... centered", cParent: "Footer", cExec: "SetFooter(2)"});
app.addMenuItem({ cName: " -> Set Date .... right", cParent: "Footer", cExec: "SetFooter(3)"});
//add page x of y
app.addMenuItem({ cName: "Set Page ", cParent: "Footer", cExec: "SetFooter(4)"});
app.addMenuItem({ cName: "Set Both", cParent: "Footer", cExec: "SetFooter(5)"});
app.addMenuItem({ cName: "-------------------------------", cParent: "Footer",cExec: "{}"});
app.addMenuItem({ cName: "Remove Both", cParent: "Footer", cExec: "RemoveFooter(5)"});
app.addMenuItem({ cName: "Remove Date Time (Filename)", cParent: "Footer", cExec: "RemoveFooter(1)"});
app.addMenuItem({ cName: "Remove Page", cParent: "Footer", cExec: "RemoveFooter(4)"});
//=====================================================================================
//Set/remove Footer
function SetFooter(ARG)
var re = /.*\/|\.pdf$/ig;
var FileNM = + this.path.replace(re,"")+".pdf";
var Path = this.path;
var AcDate = new Date();
var AcDateFormat = "dd/mm/yyyy"
var Box2Width = 100
for (var p = 0; p < this.numPages; p++)
var aRect = this.getPageBox("Crop",p);
var TotWidth = aRect[2] - aRect[0]
if (ARG<=3 || ARG==5)
{var fd = this.addField("xftDate", "text", p, [30,15, TotWidth-30-30,30]);
//print output?
fd.value = util.printd(AcDateFormat, AcDate) + " (" + FileNM +")";
// TEXT SIZE SETTING
fd.textSize=12; fd.readonly = true;
if (ARG==1){ fd.alignment="left" };
if (ARG==2){ fd.alignment="center" };
if (ARG==3){ fd.alignment="right" };
if (ARG==4 || ARG==5)
{var bStart=(TotWidth/2)-(Box2Width/2)
var bEnd=((TotWidth/2)+(Box2Width/2))
var fp = this.addField(String("xftPage"+p+1), "text", p, [bStart,30,bEnd,15]);
// print output?
fp.value = "Page: " + String(p+1)+ "/" + this.numPages;
// TEXT SIZE SETTING
fp.textSize=12; fp.readonly = true;
fp.alignment="center";
//==========================================================================
function RemoveFooter(ARG)
if (ARG<=3 || ARG==5) {var x = this.removeField("xftDate");}
if (ARG==2 || ARG==5) {for (var p = 0; p < this.numPages; p++)
var x = this.removeField(String("xftPage"+p+1)); }
willPutting this in a batch file within the automation function of Acrobat
delivers the goods, I need to investigate the formatting of the output to
get them to line up, have taken the middle ground and gone for a central
position for the page x/y text...... some lines are redundant
Dr B
===========================================
var re = /.*\/|\.pdf$/ig;
var FileNM = this.path.replace(re,"")+".pdf";
var Path = this.path;
var AcDate = new Date();
var AcDateFormat = "yyyy/mmm/dd HH:MM"
var Box2Width = 50
for (var p = 0; p < this.numPages; p++)
var aRect = this.getPageBox("Crop",p);
var TotWidth = aRect[2] - aRect[0]
var fd = this.addField("xftDate", "text", p, [30,15,
TotWidth-30-30,30]);
fd.value = FileNM;
fd.textSize=12; fd.readonly = true;
fd.alignment="left";
var bStart=(0);
var bEnd=(TotWidth);
var fp = this.addField(String("xftPage"p1), "text", p,
fp.value = "Page: " + String(p1) "/" + this.numPages;
fp.textSize=12; fp.readonly = true;
fp.alignment="center"; -
I have been unable to find out how to select the storyline where I want a clip inserted. Every time I try to insert a clip at the beginning of my project, it goes into the Title Storyline, not my primary one.
What does the instruction say? Are you pressing the Insert button? Are you using the W key? Are you tryin to drag into the storyline?
If you have a secondary storyline, make sure it's not selected when you do the edit. -
I have an EPS file of my logo. It is one solid colour, Upsdell Red. When I open it in Photoshop, the colour is correct. When I open it in Preview, the colour is correct. However, when I put it in Premiere Pro, it suddenly becomes a bright blood red? How can I fix this?!
Instead of dropping it into a title just drop it on the timeline.
-
Inserting a filename into BLOB
There is a lot of talk about inserting a file into BLOB or
just the file path and storing the file locally. I've decided to
store the file on the server but what I don't know is how to
capture that path and file name so I can insert it into the MySQL
database and later retrieve it when the display page is loaded.
Also, what is the download side of this? When the page is
called is there a 'best way' to serve up the file to the user?
Any sample code for this type of thing would really help me
get past this sticking point.
Thank you in advance.
I'm using a CF8/MySQL 5.x setup. Attached is my upload
code...Bob,
Thanks for the code, but won't that actually store the
document in the database rather than just storing the file path? I
guess I was thinking it would be smarter to store the path in the
DB rather than the actual file itself. I know this is an invitation
to a heated discussion as I've found many examples of it here in
the forums...
Maybe I'm just misreading the code. And, yes, the intent is
to store PDF files for the client's app.
The intent is that when a user visits page 'x' they see a
short description of a lesson then click on a link to download the
pdf resource for that particular lesson. Maybe there is a better
way to do this, I don't know. I'm relatively new at this type of
situation.
Thank you for your quick reply! -
Inserting files into lob columns stored procedure
i have created a stored procedure that inserts file into the database as a lob object. the source code converts the file into a byte [] stream (c#) and assigns to the parameter . please check the pl/sql stored procdure. is there a way to debug pl/sql code in vs 2005.
PROCEDURE "STARDOC"."INSERTFILE" (
"TITLE" IN VARCHAR2,
"AUTHOR" IN VARCHAR2,
"DESCRIPTION" IN VARCHAR2,
"PUBLISHER" IN VARCHAR2,
"LANGUAGE_ID" IN NUMBER,
"CONTENT" IN BLOB DEFAULT empty_blob(),
"FILENAME" IN VARCHAR2,
"EXTENSION" IN VARCHAR2,
"APPID" IN NUMBER,
"DOC_SIZE" IN NUMBER,
"CONTENT_TYPE_ID" IN NUMBER,
"IDENTIFIER" IN VARCHAR2,
"DOC_ID" OUT NUMBER) IS
docid number;
BEGIN -- executable part starts here
SELECT seq_document_id.NEXTVAL INTO docid FROM dual;
--Documents table
INSERT INTO DOCUMENTS(document_id, content, filename,
extension, retrieval_metadata_id,
content_metadata_id,description)
VALUES (docid,content,filename,extension,docid,docid,description);
--Content Metadata table
INSERT INTO CONTENT_METADATA(content_metadata_id, document_id,
author, title, description,
publisher, language_id, content_type_id)
VALUES (docid, docid, author,
title, description, publisher,
language_id, content_type_id);
--retrieval metadata table
INSERT INTO RETRIEVAL_METADATA(retrieval_metadata_id, identifier)
VALUES (docid,identifier);
--Storage metadata table
INSERT INTO STORAGE_METADATA(storage_metadata_id, application_id,doc_size)
VALUES (docid,appid, doc_size);
EXCEPTION
--rollback when an expetion occurs
WHEN OTHERS THEN
ROLLBACK;
END "INSERTFILE";Yes.
Are you experiencing any issues? From your posts above there is no mention of any issues you are facing that could ba attributed to the LOB size.
Has the procedure been run at least once? -
Insert filename in master slide
Can somebody tell me how I can insert the filename into the master slide (like you can insert filename in Numberq and Pages) so that when I change my filename it automatically changes also in the master slide ? Many thanks for your help.
This feature is not available "in thebox"
You may go to my iDisk:
<http://idisk.me.com/koenigyvan-Public?view=web>
and download:
foriWork:for_Pages:paste_thepath.zip
It contain two scripts.
One which pastes the pathname at the Insertion point.
One which insert the pathname at the end of the document.
I apologize but at this time I don't know the way to insert at the insertion point
Yvan KOENIG (from FRANCE lundi 25 août 2008 12:22:02) -
Hello,
Is it possible to insert a document's filename into the text automatically in pages ?
Regards
AndreasAndreas,
Yes, in '09, not sure about '08. Not available in '13.
Here's an '09 Screen Shot:
Now, I'm not sure what you mean by "automatically", but you don't have to type it manually, and it auto-updates if you rename the file.
Jerry -
Inserting filename in a document
How do I insert a filename into a document header? Or replace a filename with an updated, changed filename? Using new Pages on iMac.
I found this in Help in the Pages toolbar. It is annoying that one has to type in the filename, but at least one can get the filename in the footer
Add headers and footers
Move the pointer over the top or bottom of the page until you see the header or footer area, then click inside it.You can use just one or any combination of the three fields for your header or footer.If you’re having difficulty seeing the header and footer area, choose View > Show Layout (from the View menu at the top of your computer screen). If you still don’t see the header or footer area, click Document in the toolbar, click Document, then make sure the Header and Footer checkboxes are selected.
Enter your text and page numbers (optional).Depending on the existing header and footer content, and whether you have more than one section in your document, you may see an option to start a new header or footer. -
How can I Insert data into my msaccess Database table
Hello all,
I am new to Java programming and I have problem that how can i insert name into my database table.
The code which i have written is following:
String filename = "d:/test.mdb";
String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
database+= filename.trim() + ";DriverID=22;READONLY=true}";
Connection con = DriverManager.getConnection(database,"","");
String s = String.valueOf(text.getText());
int k =10;
Statement st = con.createStatement();
st.execute("create table Test123(name text)");
st.execute("INSERT INTO Test123 values" +s);
on the INSERT program throws exception???
can any one help me how to insert data into tabel.
Thankshe INSERT program throws exception???
can any one help me how to insert data into tabel.I have never used the jdbc driver to access, but what do you think that the flag READONLY=true means? An insert is not a read.
Kaj
Maybe you are looking for
-
SAPSLDAPI_UNICODE program not registered
Hi, Iam making RFC unicode connetion in XI3.0 , i gave corect deatils when i test connection system gives error" program not registered". But when i execute LCRSAPRFC_UNICODE its success.Not sure why SAPSLDAPI_UNICODE giving error. I have maitained t
-
I bought a used ipod nano 5th gen and it came with 900 songs on it. How can i transfer, sync, and retain the music before i authorize this unit to my itunes account? It says it will erase all content once I sync with my imac7. Is there anyway to keep
-
How to check the Success or Failure of a command
Hi, I have forms 10g in which I made delete button on a tabuler canvas behind the button I wrote DELETE_RECORD buil-In, I want to know how can I make sure the delete process is successful or fail. Thanks in advance. Khawar
-
Strange problem...has anyone seen this?
Hi, my iPod 5G video is behaving strangely... after not using it for a few days, it will ask me to use iTunes to restore the iPod when I try to turn it on. Then I reset the iPod by holding Menu+center button. After a brief moment everything in the iP
-
File handling in LightR 2.6RC importing from Leica M9
Please help - there is something going on here I don´t understand; 1. I shoot compressed DNG in my Leica - get lovely images! 2. I import to Lightroom 2.6 RC as DNGs via USB cable from the camera/device - usb port set in PTP protocol mode (have not t