Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strip hostname from field 1

Status
Not open for further replies.

penguin69

MIS
May 4, 2004
43
0
0
US
Here is my code,

Code:
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application("SourceFile_ConnectionString") 
Set RS = Conn.Execute ("SELECT * From input.csv")

Dim iCnt
Do Until RS.EOF
iCnt = iCnt + 1
message = RS("message")
	author = RS("author")
	phone = RS("phone")
	email = RS("email")
	picture = RS("picture")
	category = RS("category")
	
RS.MoveNext
Loop
RS.Close
Conn.Close
%>

After picture is read from CSV file, I need to trim the string but keep the same variable name.


would end up as

folder3/picture.jpg

I couldn't thank you enough for any assistance....

Ken
 
One way:
Code:
' picture="[URL unfurl="true"]http://hostname.domain.org/folder1/folder2/folder3/picture.jpg"[/URL]
a=Split(picture,"/")
u=UBound(a)
strippedpicture=a(u-1) & "/" & a(u)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top