On Friday, August 7, 2015 at 9:48:35 AM UTC-7, Peter Pearson wrote:
> On Thu, 6 Aug 2015 13:06:36 -0700 (PDT), PK Khatri wrote:
> > I have a following script which extracts xyz.tgz and outputs to a
> > folder which contains several sub-folders and files.
> >
> >
I have a following script which extracts xyz.tgz and outputs to a folder which
contains several sub-folders and files.
source_dir = "c:\\TEST"
dest_dir = "c:\\TEST"
for src_name in glob.glob(os.path.join(source_dir, '*.tgz')):
base = os.path.basename(src_name)
dest_na
On Wednesday, March 18, 2015 at 4:58:34 PM UTC-7, MRAB wrote:
> On 2015-03-18 23:22, PK Khatri wrote:
> > This script untars .gz file to file without extension
> >
> > import gzip
> > import glob
> > import os.path
> > import tarfile
> >
This script untars .gz file to file without extension
import gzip
import glob
import os.path
import tarfile
source_dir = "C:\\TEST"
dest_dir = "C:\\TEST"
for src_name in glob.glob(os.path.join(source_dir, '*.gz')):
base = os.path.basename(src_name)
dest_name = os.path.join(dest_di