forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[resolved] Finding a filename of a link

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
GregLand
Valued Contributor
Valued Contributor


Joined: 15 Jun 2004
Posts: 212
Location: FRANCE

PostPosted: Fri Sep 03, 2004 9:47 pm    Post subject: [resolved] Finding a filename of a link Reply with quote

Hi everybody ! Hi

I would like to know how could I find the filename of a program I download on the web

I explain you...

Example of link : http://www.server.com/folder1/.../folderX/folderXX/program.exe

I would like to find the name of "program.exe" in an infobox

I tried to use the @name(http://www.server.com/folder1/.../folderX/folderXX/program.exe) but it doesn't work...
I tried so using the option fieldsep,/
but I don't know how many folders there are...

Is there a best soluce ?

-----::-----
PS : Sorry for my English... Embarassed
Back to top
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Fri Sep 03, 2004 10:17 pm    Post subject: Reply with quote

This is one way to do it, it will delete everything in %%url before the last "/":
Code:

REM For VDS 4 and above.

%%url = http://www.server.com/folder1/.../folderX/folderXX/program.exe
REM Find / in %%url
%%endpos = @POS(/,%%url)
while @GREATER(%%endpos,0)
  REM Delete everything before "/"
  %%url = @STRDEL(%%url,1,%%endpos)
  REM Find next /
  %%endpos = @POS(/,%%url)
wend
INFO %%url

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
GregLand
Valued Contributor
Valued Contributor


Joined: 15 Jun 2004
Posts: 212
Location: FRANCE

PostPosted: Sat Sep 04, 2004 12:18 am    Post subject: Reply with quote

Very good !!!!! Very Happy
It works very Nice !! Thumbs Up

ThanX !
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group