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


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

Re: Comment about SetDirectory[]

From Alexey Popkov <lehin.p@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Comment about SetDirectory[]
Date 2013-05-21 04:02 +0000
Message-ID <knerl7$33$1@smc.vnet.net> (permalink)
References <kn77kd$8ig$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


Hi Paul,

I would not recommend to use  the

Export[NotebookDirectory[] <> "TestResultTime.txt", mTimeDiff, "Table"]

form if you are exporting many such files because NotebookDirectory[]
sometimes (approximately one time in 500 exports in one of my programs)
returns nothing and the file is exported to the default directory.

As to your case I think it is possible that SetDirectory[] worked but
NotebookDirectory[] failed... I would recommend to check the output of
NotebookDirectory[] with StringLength.

With best wishes,
Alexey




On Saturday, May 18, 2013 10:38:05 AM UTC+4, McHale, Paul wrote:
> I have often wondered whether to use:
>
>
>
> SetDirectory[NotebookDirectory[]]
>
> Export["TestResultTime.txt", mTimeDiff, "Table"]
>
>
>
> or
>
>
>
> Export[NotebookDirectory[] <>  "TestResultTime.txt", mTimeDiff, "Table"]
>
>
>
> I have left Mathematica open for 2 days as it was running a very long test. Maybe something became corrupted.  The first method did not work.  It appears SetDirectory[] simply stopped functioning.  Personally, I think the second method is better since it is atomic in nature.  It doesn't depend on any stateful settings.
>
>
>
> Has anyone else had this issue?
>
>
>
> Thanks,
>
>
>
> Paul McHale  |  Electrical Engineer, Energetic Systems   |  Excelitas Technologies Corp.
>
>
>
> Office: +1 937.865.3004   |  Fax: +1 937.865.5170
>
> 1100 Vanguard Boulevard, Miamisburg, OH  45342-0312
>
> Paul.McHale@Excelitas.com
>
> www.excelitas.com

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


Thread

Comment about SetDirectory[] "McHale, Paul" <Paul.McHale@excelitas.com> - 2013-05-18 06:38 +0000
  Re: Comment about SetDirectory[] Alexey Popkov <lehin.p@gmail.com> - 2013-05-21 04:02 +0000
  Re: Comment about SetDirectory[] "Alexey Popkov" <lehin.p@gmail.com> - 2013-05-21 04:02 +0000
  Re: Comment about SetDirectory[] John Fultz <jfultz@wolfram.com> - 2013-05-22 06:18 +0000
  Re: Comment about SetDirectory[] "Alexey Popkov" <lehin.p@gmail.com> - 2013-05-22 06:18 +0000
    Re: Comment about SetDirectory[] Helen Read <readhpr@gmail.com> - 2013-05-23 07:54 +0000
      Re: Comment about SetDirectory[] "Alexey Popkov" <lehin.p@gmail.com> - 2013-05-24 09:24 +0000
  Re: Comment about SetDirectory[] W Craig Carter <ccarter@MIT.EDU> - 2013-05-23 07:52 +0000

csiph-web