Re: Hmm......



On Wed, 14 May 2008 02:29:19 -0700, Shobhit <Thapliyal> wrote:

[...]
I have a string with me and I want to know if it represents a valid file name or a directory name. Hoever, even before that, I need to validate that string by assertig that this given damn string is indeed a potentially valid one (for File as well as for Directory).

What is it with today that has brought all the context-less posters?

As Jon says, you are posting a brand new thread, without quoting or otherwise referencing any other previous article. We have practically no idea what you're talking about.

That said, as far as validating a path, it's not possible to do without actually trying to use it. Different filesystems have different rules, and what's valid in one filesystem may not be valid in another. There's no single set of rules that can be applied to a string to inform you whether it's a valid path.

Pete
.



Relevant Pages

  • Re: Valid File Path Format
    ... > How do you check a value to see if it is in a valid file ... > Todd Huttenstine ... Dim x As String ... Another useful link is: http://www.primeconsulting.com/faqs/faq2000.html ...
    (microsoft.public.excel.programming)
  • How to check if a path *could* be a legal path?
    ... This string is to be used as a path for a new file. ... I would like to check if this string *could be* a valid file name, ... Maciej Sobczak: http://www.msobczak.com/ ...
    (comp.lang.python)
  • Valid file name
    ... Is there a simple function to test if a string is a valid file name (i.e does not contain illegal characters etc) other than doing it the long way? ... Jack Russell ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Save in location button
    ... A slash is not a valid file name character. ... date string with something like this: ... Jim Rech ...
    (microsoft.public.excel)
  • Re: Save in location button
    ... A slash is not a valid file name character. ... date string with something like this: ... Jim Rech ...
    (microsoft.public.excel.programming)