WriteLine in Public Cloud

Sorry, New to Epicor.

Is it possible to write a line to a local drive when you in the Public Cloud? I’m getting errors.

I was just trying to change a log to the local computer.

Here is my code:

bool writeLog = true;

string companyID = “KHC”;

//string logFile = @"\xxxswebprd00\xxxxxFTP$\EDIData\xxx\Pilot\IN\DT\4Demand\Ship.txt";

string logFile = @“C:\log.txt”;

StreamWriter log = null;

if (writeLog)
{
if (!System.IO.File.Exists(logFile))
log = new StreamWriter(logFile);
else
log = System.IO.File.AppendText(logFile);
log.WriteLine(DateTime.Now + " ---- Print DWH");
}

if (writeLog) log.WriteLine(“Done”);
if (writeLog) log.Close();

No. And for security reasons, you really don’t want to.

However, there are ways to create files on the server and download them. What’s your business case?

Mark W.

1 Like

But some information in this thread:

I just want to write a file that a service/program on my end can read and process data. I have a few ideas in my head that I’d like to implement. I have a lot of code written that I’d like to use.

For instance, when something ships, I want to write a text file that our UPS World Ship reads and creates a label(s) automatically.

Or have my own document control system. It uses file naming format to make the files scanned unique.

I guess I will try to use the file sync in the post you suggested, but any example code would be great.