MathGroup Archive 2005

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

Search the Archive

Re: software "file.txt" to "file.dat"

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53239] Re: software "file.txt" to "file.dat"
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Sun, 2 Jan 2005 04:12:48 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On 1/1/05 at 2:33 AM, malo at mncn.csic.es (Aurelio F Malo) wrote:

>I' d like to ask you if there is a way to transform a "file.txt"
>into a "file.dat" format.

I am certain there is. But I cannot provide details until you specify the format details of each file.

For example, you could have "file.txt" formatted as:

a single numeric record per line
multiple mixed records per line with records separated by tabs, spaces, commas etc
Mathematica Lists

The point is neither the extension .txt nor the extension .dat are sufficient to specify the format of the file.

It may be possible that all you really need is to change the file name without changing the file format. If so,

RenameFile[#,StringDrop[#,-3]<>"dat"]&/@FileNames["*txt"]

will do the trick
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Re: Slowdown
  • Next by Date: direct product of two sets
  • Previous by thread: software "file.txt" to "file.dat"
  • Next by thread: mathematica parser