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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Directories 1

Status
Not open for further replies.

gwillr

IS-IT--Management
Nov 4, 2003
267
CA
I have the folllowing code:

Code:
<% 
Dim sPath, filesys, getValue, update, count 
sPath = Request.ServerVariables("Path_Translated") 
sPath = Left(sPath,InStrRev(sPath,"\")) & "counter.txt" 
Set filesys = CreateObject("Scripting.FileSystemObject") 
%>

the file 'counter.txt' needs to be to a paralell directory, that is, i have to go up on level, then down one level in to a diffenret folder. I have tried using ./levelXX/counter.txt but it has not seemed to work. I have also tried using the full http:// url without success.

Any suggestions would be appreciated.

Gary

 
Something like this ?
sPath = Left(sPath,InStrRev(sPath,"\")) & "..\levelXX\counter.txt"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Or brut-force?
[tt]
apath=split(spath,"\")
snewpath=""
for i=0 to ubound(apath)-2
snewpath=snewpath & apath(i) & "\"
next
erase apath
snewpath=snewpath & "the_parallel_directory" & "\" & "counter.txt"
[/tt]
- tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top