Hi.
I’m trying to create, write to and read from a txt file on the controller.
I become no error from my code but nothing is written on the controller (hd0a/Temp).
The code works in virtual controler but not in a real controler.
I have attached my code below from my real controler.
Does someone know what I’m doing wrong?
string sDir = ctrl.FileSystem.LocalDirectory;
String sFileName = sDir + “/RabApplication2.txt”;
DateTime dDate = DateTime.Now;
// Check if the file exists
if (!System.IO.File.Exists(sFileName))
{
// Sparar datum i filen fA?r att kontrollera antal dagar frA?n
System.IO.StreamWriter sw = new System.IO.StreamWriter(sFileName);
sw.WriteLine(crypto.EncryptString(dDate.ToString(), sCryptoKey));
sw.WriteLine(crypto.EncryptString(“Not licensed”, sCryptoKey));
sw.Close();
}
I’m using RW5.10 and RAB 5.10
Best regards M Johnson