Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Default path for opening files

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127014] Re: Default path for opening files
  • From: nanobio9 <kuokan.liang at gmail.com>
  • Date: Sat, 23 Jun 2012 04:18:52 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jruonq$fgs$1@smc.vnet.net> <js15a9$kf3$1@smc.vnet.net>

Hi, Helen,

Thanks for the tip. The code I used was very simple. It was copied
from the help file of FileNameSetter:
{FileNameSetter[Dynamic[admittanceFile], "Open", {"mfile" ->
{"*.m"}}], Dynamic[admittanceFile]}

I have hundreds of .m files recording simulation output, organized in
a nested directory. I want the data analysis program to always start
looking for files from the root of this output data directory. I tried
the "SetDirectory" stuff. It helps if one uses commands to save or
load files, indeed, but it does not help 'FileNameSetter' to find the
location, though. That's what I wanted to ask. I think Wolfram
research put FileNameSetter there hoping people make use of it. If
that's true, it has to be more useful.

Thanks again and best regards.
KKL


> You can manually set the working directory to anything you like with
> SetDirectory["full path here"]
>
> You can also find the path to the directory your current working
> notebook lives in with NotebookDirectory[]. So to set the directory to
> the place where your notebook lives, just do this:
>
> SetDirectory[NotebookDirectory[]]
>
> If I am importing / exporting things from a Mathematica notebook, I'll
> put that at the top of the notebook, usually in an initialization cell
> so the directory is set automatically when I open up the file.
>
> Helen Read
> University of Vermont
>
> On 6/21/2012 5:15 AM, nanobio9 wrote:
>
>




  • Prev by Date: Error estimates in the Gauss-Kronrod rule
  • Next by Date: Re: Default path for opening files
  • Previous by thread: Re: Default path for opening files
  • Next by thread: Re: Default path for opening files