Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10613

Re: Default path for opening files

From nanobio9 <kuokan.liang@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Default path for opening files
Date 2012-06-23 08:27 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <js3ulv$11c$1@smc.vnet.net> (permalink)
References <jruonq$fgs$1@smc.vnet.net> <js15a9$kf3$1@smc.vnet.net>

Show all headers | View raw


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:
>
>

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Default path for opening files nanobio9 <kuokan.liang@gmail.com> - 2012-06-21 09:15 +0000
  Re: Default path for opening files Helen Read <readhpr@gmail.com> - 2012-06-22 07:02 +0000
    Re: Default path for opening files nanobio9 <kuokan.liang@gmail.com> - 2012-06-23 08:27 +0000
      Re: Default path for opening files Dominik Hezel <sendme2000@me.com> - 2012-06-26 08:48 +0000
  Re: Default path for opening files "E. Martín-Serrano" <eMartinSerrano@telefonica.net> - 2012-06-22 09:15 +0000
  Re: Default path for opening files David Bailey <dave@removedbailey.co.uk> - 2012-06-23 08:22 +0000
  Re: Default path for opening files "E. Martín-Serrano" <eMartinSerrano@telefonica.net> - 2012-06-24 08:22 +0000
  Re: Default path for opening files awnl <awnl@gmx-topmail.de> - 2012-06-25 08:02 +0000
  Re: Default path for opening files "E. Martín-Serrano" <eMartinSerrano@telefonica.net> - 2012-06-26 08:47 +0000
  Re: Default path for opening files nanobio9 <kuokan.liang@gmail.com> - 2012-07-01 06:13 +0000

csiph-web