File Paths

BlitzPlus Forums/BlitzPlus Programming/File Paths

thalamus(Posted 2005) [#1]
Is there a way to feed Blitz+ a filepath when prompting the user for a filename?

Say, for instance, the user elects to save a graphic image, and I want them to save in the "graphics" directory - is there a way to do this automatically?


WolRon(Posted 2005) [#2]
RequestFile$( [title$[,exts$[,save[,defname$]]]] )


Parameters
title$ - the title for the file requester 
ext$ - a comma separated list of allowed file extensions 
save - an optional flag to indicate whether the file is for saving or opening. 
defname$ - the default filename (or directory) to use when the requester opens.  



thalamus(Posted 2005) [#3]
Can't get this to work - what specifically does DEFNAME include? The *full* path, or a relative one?


Blaine(Posted 2005) [#4]
Relative should work, but best use full. Be sure to add the filename to the end of the directory (ie "C:\file.txt", or "C:\*.txt" if you don't want to select any file).