SEO Search
Custom Search
Business Stamps
Current Labels
Reports
Card Scanner

Asp.net Listing Directories With Spaces In Name Doesn’t Work?

Does anyone know how to list directories with space in their name? I’m really stucked!

One Response to “Asp.net Listing Directories With Spaces In Name Doesn’t Work?”

  • MiMiQuE says:

    a simple solution is to use ‘chr()’ to replace ’space’ in strings. i use this trick back in my college days to avoid confusion with the many ” ‘ ” we use, as an extra ” ‘ ” would result in making the statements preceding it be a comment… anyway here’s your code. i am using Visual Basic as my programming language:
    dim myfilename as string
    myfilename = “c:mydir” & chr(32) & “withspaces”
    //you can now use myfilename as the file name with spaces
    //note that “space” in ascii code is ‘32′ so use ‘chr(32) to replace all the spaces as needed

Leave a Reply

Powered by Yahoo! Answers