Results 1 to 4 of 4

Thread: validating filenames

  1. #1

    Thread Starter
    Fanatic Member Kzin's Avatar
    Join Date
    Dec 2000
    Posts
    611

    validating filenames

    I need to convert web page titles to valid filenames. Can't find anything on plant sourcecode - anyone got anything to hand or shall I just filter to remove all non-alphanumeric characters?
    Looking for a friendly intelligent chat forum? Visit the white-hart.net

  2. #2
    Frenzied Member
    Join Date
    Sep 1999
    Location
    Phoenix, az
    Posts
    1,517
    Just use the Hex function to convert nonvalid file characters.

    an example:

    Code:
    Dim sFile As String
    sFile = "mypage/index.html"
    
    sFile = Replace(sFile, "/", CStr(Hex(Asc("/"))))

  3. #3

    Thread Starter
    Fanatic Member Kzin's Avatar
    Join Date
    Dec 2000
    Posts
    611
    that looks a very elegant way - thanks
    Looking for a friendly intelligent chat forum? Visit the white-hart.net

  4. #4
    Frenzied Member
    Join Date
    Sep 1999
    Location
    Phoenix, az
    Posts
    1,517
    Thanks =)

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