• 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

    • EMDB 5.38 by Razvan Serea EMDB is an application to keep track of your movie and TV Series collection. Both physical discs and media files are fully supported. With an automatic import from the database of IMDB, export to csv, text or HTML, thumbnail cover preview, a loan tracker, advances search and filter functions and multi-language user interface. EMDB doesn't need a .NET framework or any other external libraries and is therefore fully portable. And best of all... it's free!. EMDB 5.38 changelog: User interface: fix initial sort order was not always correct." Batch Update: fix updating TV Series from TheMovieDb cleared the title." Database: fixed possible invalid aspect ratio or codec could crash sorting." Search: added search on UPC / EAN." HTML Export: fixed favorites." Media files: delete / move thumbnails and subtitles too along with the media file." Image Import: added option to set resolution of saved images (when you use a zoomed bookshelf or display html on a 4K screen)." Batch update: movies in Collections were not always updated." Batch update: added an option to remove drive labels from media paths as they are not supported anymore and will break playing." HTML Export: fixed crash during export." Translations: updated the Arabic, Czech, French, German, Hebrew, Portuguese, Slovenian and Dutch translations." Download: EMDB 5.38 | 6.2 MB (Freeware) Link: EMDB Home Page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • AMD brings datacenter-level AI to Windows PCs, runs Meta's 109B Llama lodel locally by Pradeep Viswanathan Earlier this year, during CES 2025, AMD announced the world's first AI PC processor that can run Meta's Llama 70B model locally. Today, AMD announced that the Ryzen AI MAX+ 395 processor, when paired with 128 GB of RAM on Windows, can now run Meta’s Llama 4 Scout 109B (17B active) with full vision and MCP support. This capability is enabled for the AMD Ryzen AI Max+ 395 processor with the new AMD Software: Adrenalin Edition 25.8.1 WHQL driver update. AMD claims that this processor can not only run Meta’s Llama 4 Scout but also supports a context length of 256,000 (Flash Attention ON, KV Cache Q8), which is useful for agentic workflows. AMD claims that the Llama 4 Scout 109B model was previously only possible on datacenter-grade hardware but is now available in thin and light PCs, thanks to its Variable Graphics Memory feature. Variable Graphics Memory is AMD's BIOS-level feature, introduced with the latest Ryzen AI 300 series processors, that enables users to reallocate a percentage of the system RAM to the integrated graphics. This unified memory architecture allows users to allocate unused system RAM as dedicated graphics memory. The AMD Ryzen AI Max+ processor is now available as an option for the following Windows PCs: ASUS ROG Flow Z13 Corsair AI Workstation 300 Framework Desktop HP ZBook Ultra G1a HP Z2 Mini G1a By enabling massive AI models to run locally, AMD is paving the way for more responsive, private, and capable AI applications on Windows PCs. As an Amazon Associate we earn from qualifying purchases.
    • You ARE old. Its not just a feeling.
    • Higher "Social Charges". I think that is a feel good phrase for 'Employee Deferred Compensation Charges". Then again, they use different wording in the "Old World." More precisely in American Accounting Lingo: "Mark to the Market Employee Differed Compensation Charges."
    • TikTok's "Add to Music App" feature gets support for another music streaming service by David Uzondu Image via Depositphotos.com TikTok's "Add to Music App" feature is getting support for another streaming service: YouTube Music. This comes a few months after the short-form video giant brought the feature to SoundCloud. "Add to Music App", if you have not heard of it, is a feature launched back in November 2023, initially for US and UK users, that makes saving music a lot easier. With this feature, users get an "Add Song" button next to the track name at the bottom of a TikTok video. When a customer first uses the feature, they can select their preferred streaming service from the available options, and this choice then becomes the default for all future one-tap saves (this can be changed anytime in the app's settings). The new YouTube Music integration means you can directly save the track to the streaming service with a single press. Users can also add a track from an artist's Sound Detail Page. When "Add to Music App" first appeared, the options were limited to Spotify and Amazon Music. Since then, TikTok has added Apple Music and Deezer. Each service gets a designated spot for the saved tracks, like Spotify's "Liked Songs" playlist. In YouTube Music's case, the song will land in a dedicated "TikTok Songs" playlist, so you do not have to go hunting for it later. TikTok claims that its "Add to Music App" function has resulted in over 1 billion saves globally since its wider rollout in 2024. On a related note, you probably are already aware of the current divest-or-ban issue TikTok's facing in the US. Howard Lutnick, the US Commerce secretary, recently stated in an interview with Fox News Sunday that President Trump loves the platform and sees it as "a good way to communicate with young people," but the platform's US operations must be handled by an American company, not Chinese.
  • Recent Achievements

    • Week One Done
      andeyhawk65 earned a badge
      Week One Done
    • First Post
      Jake2530 earned a badge
      First Post
    • Explorer
      Deranox went up a rank
      Explorer
    • Week One Done
      John Volks earned a badge
      Week One Done
    • One Month Later
      enric earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      675
    2. 2
      ATLien_0
      253
    3. 3
      Xenon
      177
    4. 4
      neufuse
      138
    5. 5
      +FloatingFatMan
      100
  • Tell a friend

    Love Neowin? Tell a friend!