Thank for the quick reply.
I am able to get the attachment ids using this statement
var attachment = item.getAttachments();
When I display the attachment variable, it shows 157. However, I am unable to get the filenames from this statement
var filename = Zotero.Items.get(attachment).attachementPath;
when I alert the full object attachment, it displays the following content
[{"_disabled":false,"_id":157,"_libraryID":null,"_key":"7TD9VBTB","_itemTypeID":14,"_dateAdded":"2013-03-02 02:48:34","_dateModified":"2013-04-09 07:38:50","_firstCreator":"","_numNotes":0,"_numNotesTrashed":null,"_numNotesEmbedded":null,"_numNotesEmbeddedIncludingTrashed":null,"_numAttachments":0,"_creators":[],"_itemData":{"1":null,"27":null,"110":"Davis et al. - 2012 - Abruptly autofocusing vortex beams.pdf"},"_sourceItem":156,"_primaryDataLoaded":true,"_creatorsLoaded":false,"_itemDataLoaded":false,"_relatedItemsLoaded":false,"_changed":{},"_changedPrimaryData":false,"_changedItemData":false,"_changedCreators":false,"_changedDeleted":false,"_changedNote":false,"_changedSource":false,"_changedAttachmentData":false,"_previousData":{},"_bestAttachmentState":null,"_fileExists":true,"_deleted":null,"_hasNote":null,"_noteTitle":null,"_noteText":null,"_noteAccessTime":null,"_cachedAttachments":null,"_cachedNotes":null,"_attachmentLinkMode":0,"_attachmentMIMEType":"application/pdf","_attachmentPath":"storage:Davis et al. - 2012 - Abruptly autofocusing vortex beams.pdf","_relatedItems":false,"_sourceItemID":156}]
As i can understand, "_key":"7TD9VBTB" is the directory in storage folder and "_attachmentPath":"storage:Davis et al. - 2012 - Abruptly autofocusing vortex beams.pdf" is the filename.
I wish to know, I can extract these two values to form the complete file path string.
shashi