If I understand your need, you want to list the entire contents of a directory, and pipe that into a text file.
since ls will only display the filenames, you can get the directory via the pwd command. Unless you absolutely need the path to preceed the filenames, I'll assume that simply listing the path at the beginning of the file is sufficient...in which case, the following commands should get you what you need:
pwd > /path/to/output_file && ls -ld * >> /path/to/output_file
The above assumes that you are running it from the directory you wish to list the contents of.
If I've misunderstood, and you have a bunch of symbolic links in said directory, and you're wanting to see where you're linking to...the following should do the trick:
ls -ld * |grep '>' > /path/to/output_file