List Drupal files directory
This is how you can list files in Drupal 6 files directory
This is how you can list files in Drupal 6 files directory
Here is some code for uploading files to Drupal 6
This is how you can save node content to a file and attach it.