c# - ZipFile extracting issue -
so method gets directory of file (is .jdcedfile renamed .zip file) method try rename het file , extract specified folder. , show contents right textboxes. method fails @ extracting process , don't understand why.
public void openencodedfile(string path) { // variabelen + verwerking string defaultpath = application.startuppath + @"\temp"; string defaultzip = path; string defaultziprename = defaultzip.replace(".jdcedfile", ".zip"); file.move(defaultzip, defaultziprename); zipfile.extracttodirectory(defaultziprename, defaultpath); input.text = file.readalltext(defaultpath + @"\tempdata.txt"); password.text = file.readalltext(defaultpath + @"\temppass.txt"); file.move(defaultziprename, defaultzip); }
"path" has wrong, tested , worked fine.
Comments
Post a Comment