Re: Problems reading files
- To: mathgroup at smc.vnet.net
- Subject: [mg15401] Re: [mg15337] Problems reading files
- From: Maarten.vanderBurgt at icos.be
- Date: Wed, 13 Jan 1999 20:57:16 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Sergio, I did something similar the following way: datadir ="C:\\TEMP\\DATA"; ReadDataFile[filenr_, dir_]:= ReadList[ dir<>"\\A6E24"<>ToString[PaddedForm[filenr,2,NumberPadding->{"0",""}]]<> ".txt",Number,RecordLists ->True]; ] Do[data[i] = ReadDataFile[i,datadir],{i,1,200}] Maarten van der Burgt Leuven Belgium Sergio Terrazas <sterraza at campus.cdj.itesm.mx> on 08-01-99 10:15:25 AM Subject: [mg15401] [mg15337] Problems reading files Hello Mathgroupers! I have two questions about reading files into Mathematica 3.0 : 1) When using ReadList["A6E24001.txt",Number,RecordLists->True] sometimes the file gets read, !and sometimes not! and I get the message "File not found" What could be going on? 2) I need to read 200 such files, with names like A6E24001.txt, A6E24002.txt, A6E24003.txt, ..., A6E24200.txt. Is there a way to do it automatically? Thanks a lot for any help any of you can give me. Happy New Year! Sergio Terrazas Juarez, Mexico