Hi:
It really depends on whether your directory contains SAS datasets that you want to append into 1 bigger SAS dataset or whether your directory contains a set of disparate files (like .TXT or .CSV files) that you want to append together.
The code would be different depending on what/how you want to do the appending. For SAS datasets, you might want to look at the syntax for PROC APPEND (for a procedure method to append SAS datasets) or the SET statement within a DATA step program (for a program language method to append). In addition, you could use PROC SQL for appending SAS datasets together.
If you look in the documentation that's on-line and/or search for previous forum postings, I believe you'll find some code examples to help you.
cynthia