Log files purge

I would like to purge log files in the eM Client log folder. Does anyone know if there is an officially sanctioned method?

If nothing ‘official’, what are you folks using/doing to clean up the accumulation in the log folder?

Thanks in advance

I run a manual backup .cmd file. Included are pre-backup cleanup operations so I’m not backing up certain, unnecessary items. One of those ops removes EM client logs:

del d:\Data\EmClient\Logs\*.log /s /q 2> nul
1 Like

Thank you for the rather simple option.
Can you define the meaning of “/s /q 2> nul” options ?

  • /s = include sub directories. In the case of Em Client logs, there aren’t any, but these operations of mine are part of a series of .cmd files that are used for other cleanup. Hence, covering my bases. And if, someday EmClient logs do have sub-directories, I won’t need to change anything.

  • /q = quiet. Do not ask if it’s okay to delete multiple files. For my purposes, I don’t want these operations to be interactive. Just roll on.

  • 2> nul suppresses error output. Stream #2 is the error stream.

Can I assume that eMC creates the folder if it does not exist?

Thanks again!

In my case, I’m not deleting the Logs folder, just the files inside of it. However, the answer to your question is: yes, EMC creates the folder if it’s not there.

It’s pretty standard practice for an app to create the directory structure it needs. But just to check, I closed EMC, renamed Logs to LogsXX. When I started EMC up again, it made a new Logs directory.

1 Like

I appreciate that test… I agree with you about the “standard practice”

1 Like

The official method is within the eM Client settings:

But with eM Client closed you can also just delete the contents of the C:\Users\yourusername\AppData\Roaming\eM Client\Logs folder.

Whichever is easiest for you.


@Gary, thanks… definitely choices, yours and others.