I'm using dotnetzip to zip a file but the zip file takes the root directory of the file, I just wanted to zip the file without the directories:
public static void Zipar(FileInfo file)
{
using (ZipFile zip = new ZipFile())
{
zip.Password = "******";
zip.AddFile(file.FullName);
zip.Save(file.FullName.Replace(file.Extension,".zip"));
}
}
Inside the zip file looks like this: \pasta\pasta\arquivo.txt
I wanted it to look like this: arquivo.txt