• Check file existis on server dir

    Author
    Topic
    #466017

    I check the file existis in local with a simple script for example if the file is in c:my_dirmy:file.txt
    But if the file is in \server_dirmy_file.txt the same code not work, why?
    have a tips.?

    Viewing 0 reply threads
    Author
    Replies
    • #1205928

      Sal

      Try this 2 part function

      Code:
      Function FileExist(fname) As Boolean
      	 If Dir(fname)  "" Then _
       	 FileExist = True _
       	Else FileExist = False
      End Function
      '------------------------------------------------------------------------------------
      'The VBA code that uses the above function is as follows:
      Sub FindFile()
      
      strPath = "\supportAllxmlcode.xml"
       	FileStatus = FileExist(strPath)
       	If FileStatus  True Then MsgBox "Does Not Exist"
      
      End Sub
      
      
    Viewing 0 reply threads
    Reply To: Reply #1205928 in Check file existis on server dir

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel