• 0

Get File path from Sharepoint?


Question

I am submitting a query to sharepoint 3.0, trying to return a list of documents in a document list. I get a listing, but I can't seem to get the full path to the actual document. I get a http://site/project/page.aspx?id=2

I don't want the ID, I want the path to the file

http://server/storagelocation/file.docx

When I submit my query it is like

select path, title, datecreated from scope()

I don't think path is the right one...

Link to comment
https://www.neowin.net/forum/topic/811336-get-file-path-from-sharepoint/
Share on other sites

13 answers to this question

Recommended Posts

  • 0

Yeah I believe I am using the search.asmx one. Is there a special one just for documents? I know the rest of my searches return what they are suppose to return using that web service. When I retrieve the contents of lists, using a separate web service, my CAML includes a <includeattachments... and I get full file paths to the files.... That is what I am looking for, but in a search....

  • 0

Ok your link looks good, and it gives a good reference to the different web services. However, when you search through the search.asmx web service, you have to set up properties in a search scope. I am trying to figure out how or what property to use to get the file path on search results that are documents....not the IDs. My search scope is only supposed to return documents, not other list items, so that should simplify it.

  • 0

oh i see you are actually using the search service for searching.. soz, thought you were mis-using it.

hmm....

if i have time this week, i could try and have a play with this.. i'm sure it's quite straight forward although sharepoint is not the most straight forward platform to work with!!

  • 0

Yeah, wish I could post my code, but I can't. However here is an example that is close...

http://www.codeproject.com/KB/sharepoint/P...-MOSS_2007.aspx

Only I am looking in a custom scope, which includes only documents. It may be that I have not configured the scope with the correct field to return the full document path.

  • 0

Most references I am finding just code in the file path from the configuration file settings...

Something like...

http://sharepointsite/documentlibraryname/filename.extension

I guess....

  • 0
  chorpeac said:
Most references I am finding just code in the file path from the configuration file settings...

Something like...

http://sharepointsite/documentlibraryname/filename.extension

I guess....

yep, that is exactly how it works.. i thought the whole issue here was that you can't return the filename?

man, i should really pay more attention to threads..

  • 0

I can return the file name, but I was hoping the search result returned would also be able to include the physical location of the file. I mean, I guess I was asking too much from sharepoint

  • 0

Well I found out what the problem was for this. I was able to get the what I wanted from Path, but only for documents that were indexing correctly. The server was not correctly configured for pdf files. Once I corrected this, by following Adobe's recommendation for the iFilter on a x64 machine, and reindexed the libraries it was all good.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

  • Recent Achievements

    • One Month Later
      Falcon.ai earned a badge
      One Month Later
    • Week One Done
      Falcon.ai earned a badge
      Week One Done
    • Dedicated
      EYEREX earned a badge
      Dedicated
    • First Post
      Electronic Person earned a badge
      First Post
    • Week One Done
      CyberCeps666 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      617
    2. 2
      ATLien_0
      231
    3. 3
      Xenon
      164
    4. 4
      neufuse
      138
    5. 5
      +FloatingFatMan
      122
  • Tell a friend

    Love Neowin? Tell a friend!