|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Reading a directory
I am trying to simply convert a bunch on .txt files to .html files by pasting a header and footer to the txt file content and resaving as .html.
I wrote a script in PHP to do it, but with 28,000 files to convert it would be a fairly lengthly task to ftp all the files up and then back down. I have read how to open and save a file, but is it possible to read and loop through a directory of files? sorry total newbie question.. rootdog |
|
#2
|
||||
|
||||
|
If you're using a *NIX machine, then you'd typically use opendir, readdir and closedir. I posted an example of how to use these functions a while back in this thread:
http://forums.devshed.com/showthrea...3926&forumid=42 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > Reading a directory |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|