how to create .tar file on windows OS?

tar
15,477

Solution 1

I'd get some form of tool (like 7zip) to do this - Google has alternatives and demos. Otherwise you'll need to do something like scp it to a linux server and tar it up via command line.

Solution 2

http://unxutils.sourceforge.net/ has ported the majority of Unix tools to the Win32 API, including tar.

Solution 3

If Python is installed, then you can use the tarfile module:

import tarfile
with tarfile.open('myFolder.tar', 'w') as tar:
    tar.add('myFolder/')

or if you want a compressed file, then do:

import tarfile
with tarfile.open('myFolder.tar.gz', 'w:gz') as tar:
    tar.add('myFolder/')

Links

Share:
15,477
Girdhar Singh Rathore
Author by

Girdhar Singh Rathore

I am a tech geek, I love to learn new technologies and solve programming problems.

Updated on June 14, 2022

Comments

  • Girdhar Singh Rathore
    Girdhar Singh Rathore about 2 years

    I am using window OS. I have a folder named as myFolder which contains many files, I need to convert that myFolder to myFolder.tar file. Anyone please suggest how to do it?