Mar 4, 2000, 8:46 PM
Post #1 of 3
Hi Gang, this one should be easy for most of you.
Setting an explicit Path and using optional variable
I want to assign a specific directory that is to be used for storing, and creating files, but I also want to use a variable for designating what the filename is going to be.
MyVariable = "mytextfile.txt"
So I would end up with something like
c:\directory\subdirectory\mytextfile.txt in which I open or create if not found.
The script I have been messing with allows me to pass a filename at the end. But since I dont know how to set an explicit path to append this to, one can literally create a file anywhere by doing something like:
This opens up a big security hole in itself.
I'm sure this is a one line fix, I just can't seem to get it right