|
-
Dec 3rd, 2002, 01:20 AM
#1
Thread Starter
Hyperactive Member
[Resolved] Need help on asp/vbs script..
I want to use the following script in a file:
Set si = fso.OpenTextFile(Request.ServerVariables("PATH_TRANSLATED") & "NewFile.txt", 2, True)
But my problem is that if i use this, then the output file will get a name like: "index.aspNewfile.txt"
Simply because of the "path_translated" gives the total path and filename..
So npw i wonder how an EASY way to SPLIT a variable containing the (Request.ServerVariables("PATH_TRANSLATED") info
so that the last /filename.asp would go away!
EG; it should make:
c:\docs\net\index.asp to c:\docs\net\
So that it reads the variable from end towards beginning and split at the first / i sees... Then removes everything from the end to the / ...
Can anyone help me with a short short script for that !?!?!?
Last edited by alexdata; Dec 3rd, 2002 at 02:58 PM.
***************
Please use [highlight=vb] ..your code.. [/highlight] when posting code!
When you have received the working answer to your question,
please mark it as *SOLVED* + Your Questions Title ...using your Thread's Tool menu.
Also try to point out what answer made it work for you, or edit your first post to contain a quote of the correct answer...
Please Answer All Questions With Working Code Examples...
My Unfinished Projects and My working Programs
***************
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|