MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: FileNameDialog

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38795] Re: [mg38768] FileNameDialog
  • From: "P.J. Hinton" <paulh at wolfram.com>
  • Date: Sun, 12 Jan 2003 06:18:02 -0500 (EST)
  • Organization: "Wolfram Research, Inc."
  • Sender: owner-wri-mathgroup at wolfram.com

On Fri, 10 Jan 2003, Rainer Bausch wrote:

> In a contribution to mathgroup, somebody asserted in 1997 that 
> 
> userFile=FrontEndExecute[{FrontEndToken["FileNameDialog"]}]
> 
> allows the user to input a file name from the Windows file selector box
> into a Mathematica variable.  (Search in the Archive for the keyword
> FileNameDialog; to find this contribution.)  However, this does not work
> in Mathematica 4.1 (under Windows NT). I guess that it did not work in
> 3.0 either.
> 
> It is true that the file selector box appears, and that the name and path
> of the selected file is pasted into the notebook, but the user filename
> entry is not transferred into the variable.

If the goal is to store the result of the file browse operation as a 
kernel string, then the code you need to use is:

userFile = Experimental`FileBrowse[]

The code you cite is the programmatic equivalent of the front end menu 
command Input -> Get File Path...

-- 
P.J. Hinton
User Interface Programmer                         paulh at wolfram.com
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.



  • Prev by Date: Re: Clearing when closing notebooks
  • Next by Date: Re: Design problem in 4.2?
  • Previous by thread: RE: FileNameDialog
  • Next by thread: Re: FileNameDialog