1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

check if folder exists on shared / network drive

Discussion in 'C#' started by tomgirlz, May 4, 2007.

  1. #1
    Hello all
    I have an asp script that will check if a folder exists. It works great untile I try to check for a folder on my mapped network drive i.e. \\warservertom\somefolder

    Here is the code I have:
    
    dim fs,drivename
    
    drivename = request.Form("drive")
    
    If request.Form("submit") = "" Then
    	sTBL = "<form action= '' method = 'post'><table><tr><td>Drive name: <input type='text' name='drive' /></td></tr>"
    	sTBL = sTBL &"<tr><td><input type = 'submit' name = 'submit' ></td></tr></table>"
    	
    	response.Write(sTBL)
    else
    	Set objFSO = CreateObject("Scripting.FileSystemObject")
        
    	If objFSO.FolderExists(drivename) Then
        	response.Write("exists")
    	Else
            response.Write("does not exists")
    	End If
    	
    end if
    
    
    Code (markup):
    I need to be able to serech for folders on a networkd and copy them and move them to another folder.
     
    tomgirlz, May 4, 2007 IP
  2. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Try actually mapping the folder so you can hit "W:\Blah\" or if this iswhat your doing, try in reverse, by trying to hit "\\blah\blah". Do you hvae the appropriate settings set for permissions on that folder to read? Firewall or Proxy?
     
    ccoonen, May 6, 2007 IP