John,
The case I had mentioned is related to creating an animation based on
Dynamic interface. I know that it is not straightforward way but it was
simplest since I originally made a Dynamic presentation and the easier way
was just Export a Table of frames each has different value of a time-related
parameter (which was Dynamic). I had about 2500 such GIF frames in my
exported animation and I recreated them several times while I polished my
animation. And I did not change my Export code: file path was always started
with "NotebookDiretory[]<>...". And finally I found about 5 of about each
2500 exported frames in the documents directory on disk C:\ (I always place
my documents on disk D:\ and here was placed the evaluating notebook). All
other frames was exported to requested location on disk D:\. The missing
(unexpectedly exported to the documents directory on disk C:\) frames result
in significant damage of my animation.
Sincerely,
Alexey
-----Original message-----
From: John Fultz
Sent: Tuesday, May 21, 2013 8:51 PM
To: Alexey Popkov
Cc:
math...@smc.vnet.net
Subject: Re: Comment about SetDirectory[]
I've never heard of or seen Alexey's issue before. However, it is the case
that NotebookDirectory[] will return $Failed if you execute
NotebookDirectory[]:
* in a notebook which hasn't been saved to disk, and therefore doesn't have
a notebook.
* in an evaluation which wasn't directly triggered by a specific notebook,
such as a ScheduledTask.
John Fultz
jfu...@wolfram.com
User Interface Group
Wolfram Research, Inc.
On May 20, 2013, at 11:02 PM, "Alexey Popkov" <
leh...@gmail.com> wrote:
> 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
>
>
>
> "McHale, Paul" wrote:kn77kd$8ig$1...@smc.vnet.net...
>