I have this code in my controller:
public ActionResult Upload(ScormUploadViewModel model)
{
if (ModelState.IsValid)
{
if (model.ScormPackageFile != null)
{
string zipCurFile = model.ScormPackageFile.FileName;
string destinationDirectoryName = Path.GetFullPath(zipCurFile);
//.GetFileNameWithoutExtension(zipCurFile);
Directory.CreateDirectory(destinationDirectoryName);
}
}
}
I upload a zip file through my view and then need to unzip it in the same location in a folder with the same name as the zipfilename
the file is: C:\TFSPreview\Zinc\Web\Project\ScormPackages\Windows 8 Training SkyDrive - Spanish.zip
I need to create a folder in C:\TFSPreview\Zinc\Web\Project\ScormPackages\ with the name: Windows 8 Training SkyDrive - Spanish
thus have: C:\TFSPreview\Zinc\Web\Project\ScormPackages\Windows 8 Training SkyDrive - Spanish\
and UNZIP in this above folder all the files contained in C:\TFSPreview\Zinc\Web\Project\ScormPackages\Windows 8 Training SkyDrive - Spanish.zip
so my question is: will CreateDirectory() create the folder Windows 8 Training SkyDrive - Spanish in C:\TFSPreview\Zinc\Web\Project\ScormPackages\ or will it try and create the folder in just c:??
thanks