# Photoshop Script - Working with external text files

**URL:** <https://forum.kirupa.com/t/photoshop-script-working-with-external-text-files/323382>\
**Category:** design\
**Created:** [June 28, 2011, 3:05pm UTC](https://forum.kirupa.com/t/photoshop-script-working-with-external-text-files/323382 "2011-06-28T15:05:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VeddyCent](https://avatars.discourse-cdn.com/v4/letter/v/bc8723/32.png) [@VeddyCent](https://forum.kirupa.com/u/VeddyCent)\
**Post date:** [June 28, 2011, 3:05pm UTC](https://forum.kirupa.com/t/photoshop-script-working-with-external-text-files/323382/1 "2011-06-28T15:05:09Z")

</div>

Hi all,

I’m writing a Photoshop script that runs through a folder of about 500 textures and checks if they have a transparent background. If they do then a copy is saved in a separate folder. I’m also trying to save the file name to a text file.

I should probably say that the script is attached to a droplet and is used by dragging a folder onto it to run the script on each of the images in the folder.

A break down of the script:  
Checks different sections of the image for transparency.  
If its transparent then saves a copy of the image in a different folder.  
Opens a text file and adds the document name to the end of the file (i.e on a new line below the last line).

I need to know how to go to the end of file so that I can add the next file name to it.  
E.G  
If the text file already contains:  
texture1  
texture2

and I want to add texture3 at the end so it becomes:  
texture1  
texture2  
texture3

how would I do this?

Any help would be much appreciated.
