You could ask ChatGPT to add the option to 1) verify each file that is copied and if a file already exists, verify that it's the same and copy only if it's not the same, 2) check if the file already exists and ask the user what to do when it finds an already existing file (overwrite if newer or different file size, overwrite regardless, skip this, skip all, cancel), 3) check the file's integrity. I'm thinking you probably need an image processor for this, but for starters, just checking the file ID would be enough. Sometimes I have come across files that had one type of extension but the file content was different. For example, a jpeg file had a PNG file in it. or a file with .png extension had BMP file content in it. That can happen sometimes. 4) check if there is enough free disk space before the file copying starts 5) show a progress dialog while copying files, 6) create and save a list of files that could not be copied for some reason, another separate list of files that already existed and were replaced in the new location, another list for files that did not exist yet.

In reply to Re: a nifty utility script from chatgpt by harangzsolt33
in thread a nifty utility script from chatgpt by Aldebaran

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.