Results 1 to 2 of 2

Thread: Spacing-issue

  1. #1
    Join Date
    Dec 1969

    Default Spacing-issue

    Hey people!<BR><BR>I have this problem. I&#039m listing files from a local folder like this:<BR><BR>Set Folder = fso.GetFolder(Server.MapPath("/dir/files/"))<BR>Set FileCollection = Folder.Files<BR>For Each File In FileCollection<BR>If Right(File.Name,4) = "mpeg" Then<BR>Response.Write "&#060;a href="&File.Name&"&#062;"&File.Name&"&#060;/a&#062;<BR>" & End If<BR>Next<BR><BR>The thing is, if the filename has a space in there somewhere the link will not be fully displayed (will only write the filename until the space comes in). Any help resolving this would be appreciated!<BR><BR>Regards,<BR>Kristian<BR>

  2. #2
    Karl Guest

    Default RE: Spacing-issue NOT sure if this will work

    you can try replacing any space with "%20"<BR>filename = replace(File.Name," ", "%20")<BR><BR>--<BR>Karl

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts