in reply to opening new file in different directory

Use double back slash inside the path

 open (FH,"C:\\Dirname\\filename.txt")

This will work