Results 1 to 2 of 2

Thread: [RESOLVED] Writing File To A Network Mapped Drive

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member ARPRINCE's Avatar
    Join Date
    Mar 2003
    Location
    Pinoy in NJ
    Posts
    381

    Resolved [RESOLVED] Writing File To A Network Mapped Drive

    My project requires to create a text file on a certain drive. Initially when testing, the file is being written on C:\DOWNLOAD which is the local folder in my IIS server. Everything is OK.

    For production, I proceeded to create a MAPPED NETWORK folder \\[Computer]\DOWNLOAD to dump the file and this is mapped in my IIS server as U:. When testing the project, the file is not being written to mapped drive U:\DOWNLOAD and upon debugging, it shows that the directory does not exists.

    Why can't I write to a mapped drive? TIA

    VB Code:
    1. '+------------------------------------------------------------+
    2.         '| CHECK IF THE MAIN DIRECTORY EXISTS, IF NOT, USE THE BACKUP |
    3.         '+------------------------------------------------------------+
    4.         Dim dirINFO As DirectoryInfo = New DirectoryInfo(dirUP)
    5.         Dim txtFileName As String = GetTheFileName()
    6.         If dirINFO.Exists = True Then
    7.             dirDUMP = dirUP & txtFileName
    8.         Else
    9.             dirDUMP = dirDOWN & txtFileName
    10.         End If

    *** DEBUG ***
    ?dirup
    "U:\DOWNLOAD\"
    ?dirdown
    "c:\DOWNLOAD\"
    ?dirinfo.Exists
    False <--- mapped drive does not exists
    Last edited by ARPRINCE; Jul 28th, 2005 at 01:52 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width