p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_components thread: Trim down or replace a path


Message #1 by Hayes_Eoin@e... on Fri, 10 May 2002 08:48:52 -0400
Hi,
	By typing str = Request.Servervariables(PATH_INFO") ,I i get the
path the current page is in, say - /users/hayese/project1/issues.asp. Now I
want a file to be uploaded to the project1 folder. How to I get the path
/users/hayese/project1 without actually typing it in? i.e how do I replace
or trim down the path string str so that the end .asp file is knocked off?

Thanks,
Eoin.
Message #2 by Shaun Steckley <SSTECKLEY@P...> on Fri, 10 May 2002 08:57:36 -0400
Something like this should do it for you...

intEnd = instrrev(str, "/")
str = mid$(str, 1, intEnd)

Shaun

-----Original Message-----
From: Hayes_Eoin@e... [mailto:Hayes_Eoin@e...]
Sent: Friday, May 10, 2002 8:49 AM
To: ASP components
Subject: [asp_components] Trim down or replace a path


Hi,
	By typing str = Request.Servervariables(PATH_INFO") ,I i get the
path the current page is in, say - /users/hayese/project1/issues.asp. Now I
want a file to be uploaded to the project1 folder. How to I get the path
/users/hayese/project1 without actually typing it in? i.e how do I replace
or trim down the path string str so that the end .asp file is knocked off?

Thanks,
Eoin.

 
%%email.unsub%%



********************************************************************
The information contained in this email is confidential and
is intended solely for the use of the person identified and
intended as the recipient. If you are not the intended 
recipient, any disclosure, copying, distribution, or taking of
any action in reliance on the contents is prohibited. If you
receive this message in error, contact the sender
immediately and delete it from your computer.

Personal e-mails are restricted by PSECU policy. As such,
PSECU specifically disclaims any responsibility or liability
for any personal information or opinions of the author
expressed in this email.
********************************************************************

Message #3 by Hayes_Eoin@e... on Fri, 10 May 2002 09:10:45 -0400
Shaun,
IT GIVES AN ERROR OF INVALID CHARACTER FOR MID$ - I'M USING VB SCRIPT

Eoin

-----Original Message-----
From: Shaun Steckley [mailto:SSTECKLEY@P...]
Sent: Friday, May 10, 2002 8:58 AM
To: ASP components
Subject: [asp_components] RE: Trim down or replace a path


Something like this should do it for you...

intEnd = instrrev(str, "/")
str = mid$(str, 1, intEnd)

Shaun

-----Original Message-----
From: Hayes_Eoin@e... [mailto:Hayes_Eoin@e...]
Sent: Friday, May 10, 2002 8:49 AM
To: ASP components
Subject: [asp_components] Trim down or replace a path


Hi,
	By typing str = Request.Servervariables(PATH_INFO") ,I i get the
path the current page is in, say - /users/hayese/project1/issues.asp. Now I
want a file to be uploaded to the project1 folder. How to I get the path
/users/hayese/project1 without actually typing it in? i.e how do I replace
or trim down the path string str so that the end .asp file is knocked off?

Thanks,
Eoin.

 
%%email.unsub%%



********************************************************************
The information contained in this email is confidential and
is intended solely for the use of the person identified and
intended as the recipient. If you are not the intended 
recipient, any disclosure, copying, distribution, or taking of
any action in reliance on the contents is prohibited. If you
receive this message in error, contact the sender
immediately and delete it from your computer.

Personal e-mails are restricted by PSECU policy. As such,
PSECU specifically disclaims any responsibility or liability
for any personal information or opinions of the author
expressed in this email.
********************************************************************


 
%%email.unsub%%

Message #4 by Shaun Steckley <SSTECKLEY@P...> on Fri, 10 May 2002 09:24:11 -0400
Just use mid...

-----Original Message-----
From: Hayes_Eoin@e... [mailto:Hayes_Eoin@e...]
Sent: Friday, May 10, 2002 9:11 AM
To: ASP components
Subject: [asp_components] RE: Trim down or replace a path


Shaun,
IT GIVES AN ERROR OF INVALID CHARACTER FOR MID$ - I'M USING VB SCRIPT

Eoin

-----Original Message-----
From: Shaun Steckley [mailto:SSTECKLEY@P...]
Sent: Friday, May 10, 2002 8:58 AM
To: ASP components
Subject: [asp_components] RE: Trim down or replace a path


Something like this should do it for you...

intEnd = instrrev(str, "/")
str = mid$(str, 1, intEnd)

Shaun

-----Original Message-----
From: Hayes_Eoin@e... [mailto:Hayes_Eoin@e...]
Sent: Friday, May 10, 2002 8:49 AM
To: ASP components
Subject: [asp_components] Trim down or replace a path


Hi,
	By typing str = Request.Servervariables(PATH_INFO") ,I i get the
path the current page is in, say - /users/hayese/project1/issues.asp. Now I
want a file to be uploaded to the project1 folder. How to I get the path
/users/hayese/project1 without actually typing it in? i.e how do I replace
or trim down the path string str so that the end .asp file is knocked off?

Thanks,
Eoin.

 
%%email.unsub%%



********************************************************************
The information contained in this email is confidential and
is intended solely for the use of the person identified and
intended as the recipient. If you are not the intended 
recipient, any disclosure, copying, distribution, or taking of
any action in reliance on the contents is prohibited. If you
receive this message in error, contact the sender
immediately and delete it from your computer.

Personal e-mails are restricted by PSECU policy. As such,
PSECU specifically disclaims any responsibility or liability
for any personal information or opinions of the author
expressed in this email.
********************************************************************


 
%%email.unsub%%


 
%%email.unsub%%

Message #5 by Hayes_Eoin@e... on Fri, 10 May 2002 09:25:06 -0400
Worked like a charm!
Thanks

-----Original Message-----
From: Shaun Steckley [mailto:SSTECKLEY@P...]
Sent: Friday, May 10, 2002 9:24 AM
To: ASP components
Subject: [asp_components] RE: Trim down or replace a path


Just use mid...

-----Original Message-----
From: Hayes_Eoin@e... [mailto:Hayes_Eoin@e...]
Sent: Friday, May 10, 2002 9:11 AM
To: ASP components
Subject: [asp_components] RE: Trim down or replace a path


Shaun,
IT GIVES AN ERROR OF INVALID CHARACTER FOR MID$ - I'M USING VB SCRIPT

Eoin

-----Original Message-----
From: Shaun Steckley [mailto:SSTECKLEY@P...]
Sent: Friday, May 10, 2002 8:58 AM
To: ASP components
Subject: [asp_components] RE: Trim down or replace a path


Something like this should do it for you...

intEnd = instrrev(str, "/")
str = mid$(str, 1, intEnd)

Shaun

-----Original Message-----
From: Hayes_Eoin@e... [mailto:Hayes_Eoin@e...]
Sent: Friday, May 10, 2002 8:49 AM
To: ASP components
Subject: [asp_components] Trim down or replace a path


Hi,
	By typing str = Request.Servervariables(PATH_INFO") ,I i get the
path the current page is in, say - /users/hayese/project1/issues.asp. Now I
want a file to be uploaded to the project1 folder. How to I get the path
/users/hayese/project1 without actually typing it in? i.e how do I replace
or trim down the path string str so that the end .asp file is knocked off?

Thanks,
Eoin.

 
%%email.unsub%%



********************************************************************
The information contained in this email is confidential and
is intended solely for the use of the person identified and
intended as the recipient. If you are not the intended 
recipient, any disclosure, copying, distribution, or taking of
any action in reliance on the contents is prohibited. If you
receive this message in error, contact the sender
immediately and delete it from your computer.

Personal e-mails are restricted by PSECU policy. As such,
PSECU specifically disclaims any responsibility or liability
for any personal information or opinions of the author
expressed in this email.
********************************************************************


 
%%email.unsub%%


 
%%email.unsub%%


 
%%email.unsub%%


  Return to Index