code_junkie

Need help removing “;” separator from items within an array, VBscript

Nov 13th, 2011
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. <%
  2. strValue = RS("ATTACHMENTS")
  3. strAryWords = Split(strValue, ";")
  4.  
  5. ' - strAryWords is now an array
  6. For i = 0 to Ubound(strAryWords)
  7. Set fso = Server.CreateObject("Scripting.FileSystemObject")
  8. Set fileObject = fso.getFile(strAryWords(i))
  9.  
  10. Response.Write "<TH><TR align=left><TD>" & strAryWords(i) &" "& fileObject.Size &" "&"<img src=images/up.gif><BR></TD></TR>"
  11.  
  12. Set fileObject = Nothing
  13. Set fso = Nothing
  14. Next
  15. %>
  16.  
  17. strValue = RS("ATTACHMENTS")
  18. strAryWords = Split(strValue, ";")
  19.  
  20.  
  21. ' - strAryWords is now an array
  22. For i = 0 to Ubound(strAryWords)
  23. If strAryWords(i) <> "" Then
  24. Set fso = Server.CreateObject("Scripting.FileSystemObject")
  25. Set fileObject = fso.getFile(strAryWords(i))
  26.  
  27. Response.Write "<TH><TR align=left><TD>" & strAryWords(i) &" "& fileObject.Size &" "&"<img src=images/up.gif><BR></TD></TR>"
  28.  
  29. Set fileObject = Nothing
  30. Set fso = Nothing
  31. End If
  32. NEXT
Add Comment
Please, Sign In to add comment