comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Writing to Multiple txt file with different names
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Writing to Multiple txt file with different names [message #94590] Tue, 18 July 2017 06:12 Go to previous message
thtran296 is currently offline  thtran296
Messages: 8
Registered: June 2017
Junior Member
Hello everybody,

I need to write my data to a bunch of different files, ideally with 'consecutive' names, such as File 1, File 2, File 3, .. so on (up to thousands of text files)

Here's my attempt:

get_lun, unit
for i = 1,1000 do begin
openw, unit, ‘File_’+ i + ‘.dat’, /get_lun
printf, unit, 'my data will go in here'
endfor

IDL keeps saying filename argument must be a scalar string.
Any help would be appreciated.

Thank you.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Plot scatter points with transparency
Next Topic: Auto-path finding when writing file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:59:45 PDT 2025

Total time taken to generate the page: 0.00359 seconds