Results 1 to 33 of 33

Thread: [RESOLVED] [2005] Validating Path

Hybrid View

  1. #1
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Re: [2005] Validating Path

    I think that you should use stimbo’s example in post #6. This way you would identify if the path is invalid or not. Note the user may have some other invalid characters in the path and this method will catch it. There is nothing horrible about this method and it is more efficient since it will do one instruction; create a folder. If it doesn’t succeed than caches the error so that you can notify the user if the path is entered is invalid.

    Although the other solution that was mentioned above posts (using FolderBrowserDialog) would be the best, since the .Net will deal with the validation of the path. But if it can be used in your project.

  2. #2

    Thread Starter
    Hyperactive Member rjbudz's Avatar
    Join Date
    Jul 2005
    Location
    San Diego
    Posts
    262

    Re: [2005] Validating Path

    The code in Post 6 will actually work. The folder does not have to exist on the initial user's machine however. So I will have to delete the folder one I create it.

    You are quite right, DT, that the code also eliminates the need for other error checking.

    But, as I expected (and see it myself) the powers that be think it lacks professionalisms, so I'll go the other less straight forward route.

    Mind you, I'm not taking away from it. It will work just fine!
    Last edited by rjbudz; Oct 11th, 2007 at 04:20 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