I think this code is strange :
System.DateTime Timestamp = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second);
string strFileName = Timestamp.ToShortDateString();
strFullFilePath = args[i] + strFileName + ".zip";
First, you can write
DateTime Timestamp = DateTime.Now;
Then ToShortDateString
depend on CurrentCulture. Force what you want (for exemple :)
String strFileName = Timestamp.ToString("yyyyMMdd");
Exception is from here, on my mind. With wrong Culture, you can have "/" in your format string.
Then, use Path.Combine
instead of operator + (no error with a missing slash)
strFullFilePath = Path.Combine(args[i], strFileName + ".zip");
Edit For those who can't format DateTime, here my code (and that works) :
public static class Constantes
{
public const String DateTimePattern = "yyyyMMddHHmmss";
}
public class SaveProcessViewModel : NotificationObject
{
[...]
String zipFileName = System.Environment.MachineName + "-" + DateTime.Now.ToString(Constantes.DateTimePattern) + ".zip";
String tempZipFile = Path.Combine(Path.GetTempPath(), zipFileName);
zip.Save(tempZipFile);
[...]
}