Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I know is probably the right tool for this job, but the tutorials don't seem to contain what I want to do.

So here's what rclone dedupe does. It's a command that may be run to remove duplicate files on Google Drive (which allows for duplicate filenames). Unfortunately rclone dedupe doesn't have an option for what I'm trying to do: remove the duplicate with the smaller size (i.e. keep the larger one). Heres the dialog that appears when I enter rclone dedupe GD:somefolder (the default command with interactivity) into the terminal (bolded text indicates things that can vary for different files):

2018/02/12 11:26:12 NOTICE: This is a file.ext: Found 2 duplicates - deleting identical copies
This is a file.ext: 2 duplicates remain
  1:      5010566 bytes, 2018-02-12 17:26:04.941000000, md5sum 5955c7ee02c216b7575354532463911e
  2:       694653 bytes, 2018-02-12 17:24:27.232000000, md5sum 5a4d64696f37ffe83d4bf5ec14e28847
s) Skip and do nothing
k) Keep just one (choose which in next step)
r) Rename all to be different (by changing file.jpg to file-1.jpg)

In the terminal, I would press letter k and Enter, which would then show: Enter the number of the file to keep>

So really the issue is that I have to extract the file sizes, compare them, select the number corresponding to the duplicate (note that there can be more than 2), enter the number after entering k. After doing so, say I select 1 after k, I get this notice:

2018/02/12 11:55:00 NOTICE: This is a file.ext: Deleted 1 extra copies

I'm still currently thinking about this, I just wanted to post this in case someone who really knows how to handle things like this has some pointers in the meantime.

In reply to Dealing with an Interactive Prompt - (rclone dedupe) by YenForYang

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others browsing the Monastery: (5)
    As of 2018-03-18 12:41 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (230 votes). Check out past polls.