Error writing to SD Card
<p>Please help...
I have created a text file in the first Activity of my App, which is all working fine.
In My next Activity, i want to append to the text file.</p>

<p>But when i try to append the catch throws up the following error..</p>

<pre><code>mnt/scard/PatRecords/testfile.txt  contains a file seperator
</code></pre>

<p>And nothing is added to the file.</p>

<p>my code for appending is..</p>

<pre><code>try {
     File directory = new File 
      (Environment.getExternalStorageDirectory().getPath()+"/PatRecords");

     FileOutputStream fOut = openFileOutput(directory.getPath()+"/"+FileName$, MODE_APPEND);
        OutputStreamWriter OutWriter = new OutputStreamWriter(fOut); 


        OutWriter.write(TestNo$+"\n");
        OutWriter.write(Date$+"\n");

        OutWriter.close();
        fOut.close();

     }  catch (Exception e) {
        Toast.makeText(getBaseContext(), e.getMessage(),
                Toast.LENGTH_SHORT).show();
        Error=1;
    }//End of try/catch
</code></pre>

<p>I have tried removing the seperators etc but still doesn't work, and as far as i can see
the path shown in the catch error is correct...?</p>
