I can't not find text file

sweetchino
sweetchino Member Posts: 12
I'm trying to save text file to local computer using codeunit but I can't not find text file on computer

// File1 is File object
// OutStreamObj is OutStream object

File1.CREATE( 'C:\Output.txt');
File1.CREATEOUTSTREAM(OutStreamObj);

OutStreamObj.WRITETEXT ('hello');


File1.Close; // To end the writing and write out to the file.

Best Answer

Answers

  • Slawek_Guzek
    Slawek_Guzek Member Posts: 1,692
    Write access to C:\ is usually disabled - this is how new out-of-th-box PCs (since Windows Vista or 7 release) and servers come configured. Just saying.
    Slawek Guzek - www.yitron.co.uk
    Business Central, MS SQL Server, Wherescape RED;
  • sweetchino
    sweetchino Member Posts: 12
    Thanks guys. I found it on server.