rip_software_regback_command + "\n") subprocess.call([rip_software_regback_command], shell=True) ##### PROCESS SOFTWARE HIVE ######################################################################################################################## #run text files through unix2dos for root, dirs, files in os.walk(folder_path): for filenames in files: #get file extension fileName, fileExtension = os.path.splitext(filenames) if (fileExtension.lower() == ".txt"): full_path = os.path.join(root, filenames) quoted_full_path = "'" + full_path + "'" print("Running Unix2dos against file: " + filenames) unix2dos_command = "sudo unix2dos " + quoted_full_path subprocess.call([unix2dos_command], shell=True) #close outfile outfile.close() #unmount and remove mount points if (os.path.exists(mount_point)): subprocess.call(['sudo umount -f ' + mount_point], shell=True) os.rmdir(mount_point) if (os.path.exists(mount_point + "_ewf")): subprocess.call(['sudo umount -f ' + mount_point + "_ewf"], shell=True) os.rmdir(mount_point + "_ewf") #call done sub to tell user program is done and alert them where the output files are located done(folder_path)
##### PROCESS SOFTWARE HIVE ######################################################################################################################## #run text files through unix2dos for root, dirs, files in os.walk(folder_path): for filenames in files: #get file extension fileName, fileExtension = os.path.splitext(filenames) if(fileExtension.lower() == ".txt"): full_path = os.path.join(root,filenames) quoted_full_path = "'" +full_path+"'" print("Running Unix2dos against file: " + filenames) unix2dos_command = "sudo unix2dos " + quoted_full_path subprocess.call([unix2dos_command], shell=True) #close outfile outfile.close() #unmount and remove mount points if(os.path.exists(mount_point)): subprocess.call(['sudo umount -f ' + mount_point], shell=True) os.rmdir(mount_point) if(os.path.exists(mount_point+"_ewf")): subprocess.call(['sudo umount -f ' + mount_point + "_ewf"], shell=True) os.rmdir(mount_point+"_ewf") #call done sub to tell user program is done and alert them where the output files are located done(folder_path)