Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
How can I change the default path for the function "Put"?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Jian  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 09:17
Newsgroups: comp.soft-sys.math.mathematica
From: Jian <jian0...@gmail.com>
Date: Thu, 5 Nov 2009 09:17:51 +0000 (UTC)
Local: Thurs 5 Nov 2009 09:17
Subject: How can I change the default path for the function "Put"?
In my computer, when I use "Put" (or ">>") to save some data to the
computer, Mathematica automatically outputs the data to a network hard
disk, where the "My Documents" folder is.  Although I know I can check
this path using "$InitialDirectory" command, I do not know how to
change it to a local folder.  Would anyone help me, PLZ?  Thanks!

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Helen Read  
View profile   Translate to Translated (View Original)
 More options 6 Nov, 10:11
Newsgroups: comp.soft-sys.math.mathematica
From: Helen Read <h...@together.net>
Date: Fri, 6 Nov 2009 10:11:42 +0000 (UTC)
Local: Fri 6 Nov 2009 10:11
Subject: Re: How can I change the default path for the function "Put"?

Jian wrote:
> In my computer, when I use "Put" (or ">>") to save some data to the
> computer, Mathematica automatically outputs the data to a network hard
> disk, where the "My Documents" folder is.  Although I know I can check
> this path using "$InitialDirectory" command, I do not know how to
> change it to a local folder.  Would anyone help me, PLZ?  Thanks!

Use SetDirectory to set the directory to anywhere you like.

SetDirectory["full path here"]

Even easier, you can set the directory to the directory where the
current notebook is saved to.

SetDirectory[NotebookDirectory[]]

I often put that statement in an initialization cell at the top of my
notebook if I am going to a lot of importing or exporting.

--
HPR


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Rowe  
View profile   Translate to Translated (View Original)
 More options 6 Nov, 10:13
Newsgroups: comp.soft-sys.math.mathematica
From: Bill Rowe <readn...@sbcglobal.net>
Date: Fri, 6 Nov 2009 10:13:53 +0000 (UTC)
Local: Fri 6 Nov 2009 10:13
Subject: Re: How can I change the default path for the function "Put"?
On 11/5/09 at 3:49 AM, jian0...@gmail.com (Jian) wrote:

>In my computer, when I use "Put" (or ">>") to save some data to the
>computer, Mathematica automatically outputs the data to a network
>hard disk, where the "My Documents" folder is.  Although I know I
>can check this path using "$InitialDirectory" command, I do not know
>how to change it to a local folder.  Would anyone help me, PLZ?

Put saves data in the current working directory. The current
working directory can be set to any directory you have the
ability to read/write using SetDirectory. For example, on a Mac

SetDirectory["~/Desktop"]

will set the working directory to the current users desktop
directory. Or assuming the notebook you are using has been saved
to the hard drive

SetDirectory@NotebookDirectory[]

will set the working directory to the directory containing the
notebook this is executed in.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dr DanW  
View profile   Translate to Translated (View Original)
 More options 6 Nov, 10:19
Newsgroups: comp.soft-sys.math.mathematica
From: dr DanW <dmaxwar...@gmail.com>
Date: Fri, 6 Nov 2009 10:19:42 +0000 (UTC)
Local: Fri 6 Nov 2009 10:19
Subject: Re: How can I change the default path for the function "Put"?
Use SetDirectory[ dir ], which sets the current working directory to
dir.

SetDirectory[] sets the current working directory to your home
directory.

SetDirectory[ NotebookDirectory[] ] sets the current working directory
to the same directory as the notebook you are working in (very
useful).  NotebookDirectory[] was introduced in version 6; if you are
using an earlier version, I can send you a function to put in your
init.m file to do the same thing.

Daniel


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin J. McCann  
View profile   Translate to Translated (View Original)
 More options 6 Nov, 10:20
Newsgroups: comp.soft-sys.math.mathematica
From: "Kevin J. McCann" <Kevin.McC...@umbc.edu>
Date: Fri, 6 Nov 2009 10:20:03 +0000 (UTC)
Local: Fri 6 Nov 2009 10:20
Subject: Re: How can I change the default path for the function "Put"?
Jian,

If you want the output where your notebook is, try

SetDirectory[NotebookDirectory[]]

and then do your Put. If you want the output in some other directory,
first use SetDirectory["output directory"], and then use your Put.

Kevin


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google