Check if file exists in Sharepoint

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ykhamitkar
    New Member
    • May 2007
    • 64

    Check if file exists in Sharepoint

    Hi there,

    can anyone help me for the code to check if a file exists on the sharepoint link
    and what object I need to pick up from the reference(if any)

    Thanks
    Yogesh
  • ykhamitkar
    New Member
    • May 2007
    • 64

    #2
    Hi there,

    I have found following code trough which I can download the file from sharepoint
    but I want to check if the file exists on sharepoint (Dont want to download all the files from sharepoint since I am dealing with 80,000 files)

    Any thought
    Thanks

    Private Declare Function URLDownloadToFi le Lib "urlmon" Alias _
    "URLDownloadToF ileA" ( _
    ByVal pCaller As Long, ByVal szURL As String, _
    ByVal szFileName As String, _
    ByVal dwReserved As Long, _
    ByVal lpfnCB As Long) As Long


    Sub DownloadFileFro mWeb()
    Dim i As Integer

    Const strUrl As String = "https://dspace.de.intra net.db.com/site0194/Final Data Repository/Lehman Brothers/Commodities/Close-out Documentation/Lehman Final Analysis - US Power.xlsx"
    Dim strSavePath As String
    Dim returnValue As Long

    strSavePath = "c:\Documen ts and Settings\khamyo g\Desktop\Lehma n Final Analysis - US Power.xlsx"
    returnValue = URLDownloadToFi le(0, strUrl, strSavePath, 0, 0)

    'MsgBox returnValue
    End Sub

    Comment

    Working...