Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
open changes working directory
#1
i tried using open and the next time i used it it didn't work since i was using a relative path but the first one took me into a different directory. Cry and it wouldn't be so bad if the first file i opened wasn't in a variable, otherwise i could just add a ".." but it's in a variable so i can't...

Code:
'dir structure:
' bas file
' [dir1]
' `-a file
' another file
'
' compile with -e
open "dir1/a_file.txt" for input as #1
close #1
open "another_file.txt" for input as #1
close #1
print "success!"
sleep
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Reply
#2
Do you mean the second file you tried to open is in the root directory?
Reply
#3
yes.
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)