You've already forked PythonLib
mirror of
https://github.com/lifebottle/PythonLib.git
synced 2026-02-13 15:25:50 -08:00
Fixing issue with Expand cab where you need to be in working_dir
This commit is contained in:
@@ -397,8 +397,11 @@ class ToolsTales:
|
||||
return False
|
||||
|
||||
|
||||
def extract_Cab(self, cab_file_name, new_file_name):
|
||||
subprocess.run(['expand', cab_file_name, new_file_name])
|
||||
def extract_Cab(self, cab_file_name, new_file_name, working_dir):
|
||||
|
||||
folder_name = os.path.basename(new_file_name).split('.')[0].lower()
|
||||
os.mkdir( os.path.join(working_dir, folder_name.upper()))
|
||||
subprocess.run(['expand', os.path.basename(cab_file_name), folder_name + '/{}.dat'.format(folder_name)], cwd=working_dir)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user