Moving files

Discussion in 'ASP.NET / ASP.NET Core' started by klroach62, Dec 23, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I am triying to move files on a network drive This work in VB but not in ASP.nET
    how do I impersonate a user





    Session("sBatch") = "ARL_LOG_07_01_03_2005"
    ' file_path = Session("sPath") & "\Images\" & Session("sBatch")
    file_path = "\\10.3.21.10\Data\IT_Test\Images\ARL_LOG_07_01_03_2005"
    file_name1 = Dir(file_path & "\*.*", FileAttribute.Directory)
    do While file_name1 <> ""
    If InStr(file_name1, ".") <> 0 And Len(file_name1) > 2 And i = Session("nextTiff") Then
    Session("nextTiff") = Session("nextTiff") + 1
    Session("txtTiff") = "data/IT_test/images/" &amp; Session("Batch") &amp; "/" &amp; file_name1
    ActiveImageFile = file_path &amp; "\" &amp; file_name1


    Exit Do


    End If


    i = i + 1
    file_name1 = Dir()


    Loop
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Are you running this on your local computer? What error are you getting?

    This will not work for sure on the hosting server.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Thanks guys I got it to work
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page