[Date Index] [Thread Index] [Author Index]
Re: Default location for Exported files?
On 6/1/08 at 3:36 AM, siegman at stanford.edu (AES) wrote: >Is there a *global* default I can set to make all files Exported >from any Mathematic notebook from now on (permanently!) always (in >the absence of other specific command) go to a default location of >my choice, on my HD? >Possible choices for this default: >1) Always to the desktop? >2) Always to the folder **which contains the notebook which does >the Exporting**? >3) Always to a designated folder on my desktop? (I happen to have >such a folder, which I call "Downloads"; essentially every other >application on my laptop -- browser, mail client, newsreader, >various editing apps, and essentially every other app -- is set so >that any web file download, any FTP, any Save As, Print to PDF, or >similar command will point to this folder; never have to worry about >where else to look.) As far as I know, there is no such default that can be set for Export. However, you could set things up so the effect would be what you want. Export, by default, exports to the current working directory. So placing a SetDirectory command in your init.m file would effectively create the desired default for Export. The problem with this approach is there are other functions that output to the current working directory that you may not want to output in the same directory as Export. The other option would be to define your own export function, e.g., myExport[filename_, expr_, opts__]:= Export[ToFileName[defaultDirectory,filename],expr, opts]