Page 1 of 1

Using the 'effective filename' function

Posted: Tue Feb 19, 2013 11:22 am
by louisharrodine
Hi there,

at the moment, this is my code:

Put effective filename of this stack & "/Records.txt" into Filedirectory

which puts C:/livecodethings/todo.livecode/Records.txt into the variable 'Filedirectory'

I want it to put : C:/livecodethings/Records.txt into the variable 'Filedirectory'
so I can store the file "Records.txt." in the same folder as the program.


Any help?

Re: Using the 'effective filename' function

Posted: Tue Feb 19, 2013 11:39 am
by Dixie
Hi...

Code: Select all

on mouseUp
   set itemDel to "/" 
   set the defaultfolder to item 1 to -2 of (the effective fileName of this stack)
   
   put the defaultfolder & "/records.txt" into filePath
   put "Hello" into URL("file:filePath")
end mouseUp
be well

Dixie

Re: Using the 'effective filename' function

Posted: Tue Feb 19, 2013 11:45 am
by louisharrodine
Thanks a lot for your reply - just put it all in, and it's working perfectly.

Thanks again.