Extract

Cameron Simpson cs at cskk.id.au
Tue May 15 01:37:34 EDT 2018


On 15May2018 07:26, mahesh d <mahesh.tech88 at gmail.com> wrote:
> I have a directory. In that folder .msg files . How can I extract those
>files.

You can get the filenames from the directory with the os.listdir function or 
with the glob.glob function. If you mean "extract the contents of those files" 
instread of just finding their names, you would need to know about the data 
format within those files, which you have not described.

See the Python docs here:

  https://docs.python.org/3/

and look up the "os" and "glob" modules for the functions mentioned above.

Cheers,
Cameron Simpson <cs at cskk.id.au>



More information about the Python-list mailing list