I troubleshooted an ES5.2 installation and found a strange bug with the function to display the logfiles from the ez_queue’s.
The default path for the logging is:
%ProgramFiles%\Citrix\System Monitoring\Server\EdgeSight\scripts\rssh\log. When you want to view this logs from the ES-Website you will get an error: cannot find ….Scripts\rssh\log\file.log
You can see that the folder Scripts was created during the installation in lowercase and will be used in uppercase. normally it should not be a problem.
So i reviewed the logs and in all logfiles the path is called Scripts
I renamed the folder and the logs are visible on the website.
really strange!
I found several examples how to copy a complete folder with c# and i want to share this script because for me it is the best and easiest solution. it is copy from the famous web-site csharp411
I’ve added some more functions to handle different scenarios, when the folder already exists or the files already exists.
In this example I’m setting ‘overwrite = true’ in the function File.Copy(file, dest, true);
public static void CopyFolder(string sourceFolder, string destFolder) { if (string.IsNullOrEmpty(sourceFolder)) { throw new ArgumentNullException("sourceFolder"); } if (string.IsNullOrEmpty(destFolder)) { throw new ArgumentNullException("destFolder"); } if (!Directory.Exists(sourceFolder)) { throw new ArgumentException("Source folder does not exist", "sourceFolder"); } try { if (!Directory.Exists(destFolder)) { Directory.CreateDirectory(destFolder); } string[] files = Directory.GetFiles(sourceFolder); foreach (string file in files) { string name = Path.GetFileName(file); string dest = Path.Combine(destFolder, name); File.Copy(file, dest, true); } string[] folders = Directory.GetDirectories(sourceFolder); foreach (string folder in folders) { string name = Path.GetFileName(folder); string dest = Path.Combine(destFolder, name); CopyFolder(folder, dest); } } catch (Exception er) { // Do something with this exception... } } |
some friends and colleagues told me to change the language to english, so here it is.
i killed my last Blog because i want to do a real new start. i tested enough the last months
Enjoy!
HoL1n

Categories
Tag Cloud
Blog RSS
Comments RSS

Void « Default
Life
Earth
Wind
Water
Fire
Light 