Menu

#10 Inconsistent output file naming

v1.0_(example)
open
nobody
None
3
2017-04-24
2017-04-21
No

By default, docx2txt chooses a different output filename depending on the case of the input extension.

If the input is filename.docx the output will be filename.txt
If the input is filename.DOCX the output will be filename.DOCX.txt

This can cause unexpected problems when docx2txt is used by a website that usually handles files with lower case extensions (it just created problems for http://acromatic.uk).

Discussion

  • Sandeep Kumar

    Sandeep Kumar - 2017-04-21

    Hi Dan,

    Please update line 421 from

    $ARGV[1] .= ".txt" if !($ARGV[1] =~ s/.docx$/.txt/);
    to
    $ARGV[1] .= ".txt" if !($ARGV[1] =~ s/.docx$/.txt/i);

    to fix the issue.

    Regards
    IK

     
  • dan hetherington

    Thanks!

     

Log in to post a comment.

MongoDB Logo MongoDB