Re: printing all notebooks
- To: mathgroup at smc.vnet.net
- Subject: [mg45768] Re: printing all notebooks
- From: Roland Franzius <roland.franzius at uos.de>
- Date: Sat, 24 Jan 2004 00:36:19 -0500 (EST)
- Organization: Universitaet Hannover
- References: <buqmrq$rcs$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Murray Eisenberg wrote:
> Using Mathematica under Windows, the function printDirectoryNotebooks
> defined below prints all the Mathematica notebooks in a user-specified
> directory. For example:
>
> printDirectoryNotebooks["e:\\Temp"]
>
> But it does not work using Mac OS-X. Can you indicate how it should be
> changed so it will be platform-independent?
>
> printNotebook[nbname_] :=
> Module[{nb = NotebookOpen[nbname]},
> NotebookPrint[nb]; NotebookClose[nb]; nbname]
>
> printDirectoryNotebooks[dirName_?StringQ] :=
> Module[{dir = SetDirectory[dirName]},
> printNotebook[dir <> "/" <> #] & /@ FileNames["*.nb"]]
>
> In particular -- and I believe this is part of the problem -- how from
> within Mathematica can one determine the path-separator character
> directly (without, say, querying $System and then accordingly select the
> path-separator character)?
>
??$PathnameSeparator
--
Roland Franzius