Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

A Conditional File Import

  • To: mathgroup at
  • Subject: [mg66076] A Conditional File Import
  • From: Gregory Lypny <gregory.lypny at>
  • Date: Fri, 28 Apr 2006 06:33:34 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Hello Everyone,

I'm wondering if there's a way to do a conditional import of a file  
into Mathematica.  Say I wrote some code to process a lot of data and  
it takes a long time to complete.  After it's done, I save my results  
by exporting to a text file.  When I come back later (months  
later...) to pick up where I left off, I'd like to avoid  
inadvertently, and because of poor memory, running that long script  
again if I already have the results on my hard drive (you would think  
that I'd have the sense to check first, but no).

I was thinking of a script that would work something like this:

If there is a file X
		import the file
		[message] "The darn thing doesn't exist!"
		Reprocess the raw data --- [message] "Better make some coffee."
End if



  • Prev by Date: Re: Selecting table rows
  • Next by Date: Re: Re: Illusory Multicore Support in 5.2?
  • Previous by thread: saving lists/plots in another notebook
  • Next by thread: Re: A Conditional File Import