• [gentoo-user] Dolphin and adding a option, if it exists.

    From Dale@21:1/5 to All on Thu Oct 6 06:50:01 2022
    Howdy,

    This may not exist.  If not, oh well.  Sometimes when I'm moving files
    with Dolphin, I need a added feature.  I tend to use split panes when I
    copy or move files.  Quite often, I want to move files from one location
    to another and the new file use the same name as the old file I'm
    replacing.  What I *wish* I could do, move the file from one pane to the
    other and drag the new file on top of the old file and it replace it
    with the name of the old file.  As it is now, I have to bring up
    properties, select the name of the file, while not including the
    extension, and copy it, then close that window and open properties on
    the new file, highlight the old name, paste new name, close window, copy
    new file over and either delete old file or tell it to overwrite the
    file.  Sometimes it has a different extension and I have to delete
    instead. 

    It would be a lot faster if I could just drag it on top of file I want
    to replace and either it be configured to use name of old file for new
    file or me select in a pop up what I want to do.  Basically, move and
    drop instead of all the properties, copy, repeat with paste on new file
    and then move and maybe delete a file as well.  I went to the services
    window and looked for anything I could add but I didn't see anything
    that would do what I describe but it could be a hidden feature of one
    that isn't obvious. 

    Has anyone ever seen something that does this?  While I use dolphin, I
    may could use another tool if it has this feature. 

    Thanks.

    Dale

    :-)  :-) 

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wol@21:1/5 to Michael on Thu Oct 6 10:00:02 2022
    On 06/10/2022 08:33, Michael wrote:
    On Thursday, 6 October 2022 05:39:59 BST Dale wrote:
    Howdy,

    This may not exist. If not, oh well. Sometimes when I'm moving files
    with Dolphin, I need a added feature. I tend to use split panes when I
    copy or move files. Quite often, I want to move files from one location
    to another and the new file use the same name as the old file I'm
    replacing. What I*wish* I could do, move the file from one pane to the
    other and drag the new file on top of the old file and it replace it
    with the name of the old file. As it is now, I have to bring up
    properties, select the name of the file, while not including the
    extension, and copy it, then close that window and open properties on
    the new file, highlight the old name, paste new name, close window, copy
    new file over and either delete old file or tell it to overwrite the
    file. Sometimes it has a different extension and I have to delete
    instead.

    It would be a lot faster if I could just drag it on top of file I want
    to replace and either it be configured to use name of old file for new
    file or me select in a pop up what I want to do. Basically, move and
    drop instead of all the properties, copy, repeat with paste on new file
    and then move and maybe delete a file as well. I went to the services
    window and looked for anything I could add but I didn't see anything
    that would do what I describe but it could be a hidden feature of one
    that isn't obvious.

    Has anyone ever seen something that does this? While I use dolphin, I
    may could use another tool if it has this feature.

    Thanks.

    Dale

    😄 😄
    Perhaps I'm missing something ...

    If the old file has the*same* name as the new file, the file manager will warn you and ask you if you want to rename the new file so as it does not overwrite the old file, or if you want to replace the old file.

    This made me think. Some times the old tools are the best - maybe I
    ought to switch from Dolphin to Midnight Commander for my use case, and
    maybe you should too.

    Okay, it doesn't do exactly what you want, but the dance you want to do
    it will make it a lot easier ...

    Cheers,
    Wol

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Thu Oct 6 08:57:28 2022
    On Thursday, 6 October 2022 08:52:04 BST Wol wrote:
    On 06/10/2022 08:33, Michael wrote:
    On Thursday, 6 October 2022 05:39:59 BST Dale wrote:
    Howdy,

    This may not exist. If not, oh well. Sometimes when I'm moving files
    with Dolphin, I need a added feature. I tend to use split panes when I
    copy or move files. Quite often, I want to move files from one location >> to another and the new file use the same name as the old file I'm
    replacing. What I*wish* I could do, move the file from one pane to the >> other and drag the new file on top of the old file and it replace it
    with the name of the old file. As it is now, I have to bring up
    properties, select the name of the file, while not including the
    extension, and copy it, then close that window and open properties on
    the new file, highlight the old name, paste new name, close window, copy >> new file over and either delete old file or tell it to overwrite the
    file. Sometimes it has a different extension and I have to delete
    instead.

    It would be a lot faster if I could just drag it on top of file I want
    to replace and either it be configured to use name of old file for new
    file or me select in a pop up what I want to do. Basically, move and
    drop instead of all the properties, copy, repeat with paste on new file
    and then move and maybe delete a file as well. I went to the services
    window and looked for anything I could add but I didn't see anything
    that would do what I describe but it could be a hidden feature of one
    that isn't obvious.

    Has anyone ever seen something that does this? While I use dolphin, I
    may could use another tool if it has this feature.

    Thanks.

    Dale

    😄 😄

    Perhaps I'm missing something ...

    If the old file has the*same* name as the new file, the file manager will warn you and ask you if you want to rename the new file so as it does not overwrite the old file, or if you want to replace the old file.

    This made me think. Some times the old tools are the best - maybe I
    ought to switch from Dolphin to Midnight Commander for my use case, and
    maybe you should too.

    Okay, it doesn't do exactly what you want, but the dance you want to do
    it will make it a lot easier ...

    Cheers,
    Wol

    I just had a look in Dolphin configuration. Under General/Confirmations tab you can select to disable asking for confirmation when you move files to wastebin, or when you delete files of folders. Not sure if this is desirable, as you could inadvertently delete a file without thinking first, but if you are going to be deleting manually a lot of files, confirming this is something you really want to do could become so repetitive you may want to disable it at least for a while.
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmM+imgACgkQseqq9sKV Zxle7hAAkzRn/0weGRVFbi2z5HHlupeXMSHC6KI4aRbnfwQo7A6dOcQqq1PS58dT 0qSE4+eQCGmEBuP0wMhvvwxWWhsPinAl4x+23OJKMoj5xykyAAt2hMmjZ+JpBbXv QCN3a84vOeG6IX2ysvw9c5k/+bQBYpF24ZsD1ZLP/TpJiAnymCHl7Az1fOxu4+JI vjALE0SNuulqm77vIzvKEK5p6S1tZO1XMkC5QMCc4bcvDNdwHHoWqILkVbPaUiSL FJoGfaKJj2j6MSf3PZyD7ipMm2hgV5YRXx2bNkJJWFCwOCkF8m/8Ew5wyGKonbIV 4jrRdoXz2cXF1auIzVUIaEtJV2v18ywpfjL0l6LqhWqQpa2fYhjFitVudnbQmBhr VcvOH+h+tiYc5IKHORfRHBbk/6ODEduAxpyf0/+3wa7KRlUY+3TIbZg2iBOCJKZq HXckEMPEW4Up0UOvb7qquTApNeH/Q0kcBBED0tfJ63GpvGXOZvu38KfHk7GU49/c llDAqm5zzRy8VECUfZRpe+Z8qVO/E2gYy1mcY3qy80QvXiP0XlOJzzBGxXhgwGUz Ss2QzFYQwpTLsG1RgUkJ3Jf+bsuvbH+znBvFodT6IsDIkTbwyGu/5vLafa6M2hsc wcsyEeXqQQ5t4lX9rieBmq8K1XSq0zC6qg/L/bck04eqiSQ6TFE=
    =K74n
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Thu Oct 6 08:33:42 2022
    On Thursday, 6 October 2022 05:39:59 BST Dale wrote:
    Howdy,

    This may not exist. If not, oh well. Sometimes when I'm moving files
    with Dolphin, I need a added feature. I tend to use split panes when I
    copy or move files. Quite often, I want to move files from one location
    to another and the new file use the same name as the old file I'm
    replacing. What I *wish* I could do, move the file from one pane to the other and drag the new file on top of the old file and it replace it
    with the name of the old file. As it is now, I have to bring up
    properties, select the name of the file, while not including the
    extension, and copy it, then close that window and open properties on
    the new file, highlight the old name, paste new name, close window, copy
    new file over and either delete old file or tell it to overwrite the
    file. Sometimes it has a different extension and I have to delete
    instead.

    It would be a lot faster if I could just drag it on top of file I want
    to replace and either it be configured to use name of old file for new
    file or me select in a pop up what I want to do. Basically, move and
    drop instead of all the properties, copy, repeat with paste on new file
    and then move and maybe delete a file as well. I went to the services
    window and looked for anything I could add but I didn't see anything
    that would do what I describe but it could be a hidden feature of one
    that isn't obvious.

    Has anyone ever seen something that does this? While I use dolphin, I
    may could use another tool if it has this feature.

    Thanks.

    Dale

    :-) :-)

    Perhaps I'm missing something ...

    If the old file has the *same* name as the new file, the file manager will
    warn you and ask you if you want to rename the new file so as it does not overwrite the old file, or if you want to replace the old file.

    If the old file has a different name, then the new file will be pasted in without asking. In this case isn't it quicker to delete the file you want replaced and then copy/move the new file over? Shift+Delete or right click - 'Delete' to delete it completely or just Delete/right click - 'Move to wastebin' in case you delete the wrong file by mistake and want to recover it later. BTW, pressing F2 after you select a file will allow you to rename it, without having to dive into properties.
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmM+hNYACgkQseqq9sKV Zxl2vRAA6zOAzPirUjF6nqCCvxjQR4kZra0fX6u6jSdpW6FtrzUMG9E8tOtPpaDi 0jxT8+/AsUo/dO80MKdzNUKldk3QHs+o9t9ewa3ejQckj039HKuHvrmdNJeg6Dgk qnSI+Kx+my82OJLA0S8uCvslqa6LNkzzGaibL9BpXloXYeRb9NY3nuwtKsmdEUmX htpaWJrhn8wNQuTetrCwrEOx5mxH9PfoQ3lvYFHKDOhTTMkB9gFq2KgRLJdMt3eR a0r5IAnEzBDUftoLRCXTUdaIkQnYlM4xmu74TWP8FxvrgusVkNF0Y1swP4Btm9go ldiGswcmLVr37V0FKogi86IQtyNlkdpvnSII0RU1mZ6jGTRT7qVPlkyZwyDeapTx GtmYTLKQPm4HbdPq7sc1pQphvDJhlOddCR5qHvM5aHsLlf3G3kVgTPJJ3FG9Eqe1 4GwYOcMuB08IVhow5UkmWE2uqMAmFCa0IGUbDEhO13gh3BA7DyxIzpq3isEfONrj oqOPPhBMLm8Em/dpPgcamafdyVMLdmHnsiFF/ZcDJuTbhQuQhimMgaDwE1/52I1p MwtINkmcYbnI3xljc9vG7b3Ajke3UMTEm1ewYGQVfHA5WcIMaybeIOFX2VmipPL6 lMEjda3eywoJl/pKzHt5pu+tzTMWSb50CO1RXkdrLhqatgOAr24=
    =Ertf
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arve Barsnes@21:1/5 to Dale on Thu Oct 6 10:20:01 2022
    On Thu, 6 Oct 2022 at 06:40, Dale <rdalek1967@gmail.com> wrote:

    Howdy,

    This may not exist. If not, oh well. Sometimes when I'm moving files
    with Dolphin, I need a added feature. I tend to use split panes when I
    copy or move files. Quite often, I want to move files from one location
    to another and the new file use the same name as the old file I'm
    replacing. What I *wish* I could do, move the file from one pane to the other and drag the new file on top of the old file and it replace it
    with the name of the old file. As it is now, I have to bring up
    properties, select the name of the file, while not including the
    extension, and copy it, then close that window and open properties on
    the new file, highlight the old name, paste new name, close window, copy
    new file over and either delete old file or tell it to overwrite the
    file. Sometimes it has a different extension and I have to delete
    instead.

    It would be a lot faster if I could just drag it on top of file I want
    to replace and either it be configured to use name of old file for new
    file or me select in a pop up what I want to do. Basically, move and
    drop instead of all the properties, copy, repeat with paste on new file
    and then move and maybe delete a file as well. I went to the services
    window and looked for anything I could add but I didn't see anything
    that would do what I describe but it could be a hidden feature of one
    that isn't obvious.

    Has anyone ever seen something that does this? While I use dolphin, I
    may could use another tool if it has this feature.

    This is probably a case of Dolphin not being a good tool, unless it
    has a built-in command-line?
    $ mv newfile oldfile
    will overwrite the old file in place with the new file with the name
    of the old file.

    In my file manager, emelfm2 (sadly not in tree any more), which has a
    built-in command-line there are at least two ways I could solve this.

    1. Equivalent to your method
    - Select old file, F2 (rename), ctrl+c, esc, select new file in other
    pane, shift+F6 (move with rename), ctrl+v, enter

    2. Equivalent to explicit command-line on the built-in terminal
    - mv %f %F (referencing selected file(s) in the active and inactive
    pane respectively)

    I know there are many file managers with a built-in terminal, so maybe
    others have similar possible solutions. I saw someone mention midnight commander which I believe is one.

    Regards,
    Arve

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Neil Bothwick@21:1/5 to Arve Barsnes on Thu Oct 6 14:50:01 2022
    On Thu, 6 Oct 2022 10:10:52 +0200, Arve Barsnes wrote:

    This is probably a case of Dolphin not being a good tool, unless it
    has a built-in command-line?
    $ mv newfile oldfile
    will overwrite the old file in place with the new file with the name
    of the old file.

    And tab-completion makes this a lot quicker than renaming files in a file manager.

    I know there are many file managers with a built-in terminal, so maybe
    others have similar possible solutions. I saw someone mention midnight commander which I believe is one.

    Or you could use a drop-down terminal like Yakuake to give a terminal on demand, whatever program you are using. Yakuake is for KDE, it wraps
    Konsole, but there are GNOME-ish variants too, I wouldn't be without it.


    --
    Neil Bothwick

    All things in moderation, ESPECIALLY moderation.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCAAdFiEE8k9T/rX16EJxEKG692eFu0QSMJgFAmM+zcwACgkQ92eFu0QS MJhDbRAAu/tPllZYp0Xsz0twm/QkWfq9RkZB4JEs10f673+vuJCL2mbn4rLnKbSI VqoUbctqQ98p2rVsIsrsGOjwa9gHXxu0fvYlS6U6/mPhxmdcUELKX+Iblq+adrfi ktu2ce37BE6S9V+E82+GEnve4Y8dsZm/IFMLLk+uCLI0PTSUb+tYvVBzktIwsE+w T9QvgCTEklsWcE3iZTLR07VLtpjsQv9NBuxsZD9k6lSbWuFn3bQBw/uOLa1r4Zmt k/QB7Cr7DD18rChz2FLtXT0IknZ/VDzAqHd+dKUFqwLP74JA4VrVDaFJph0LRhVp usFyySTM1Qf6eoPKBgDccVJwU44tSSsIS7XSGiKU7BWSCR6eO9cpwCBpEfGtYiON yDVq6w5s7So2NPyfu6GKwUaDskP5so0S/mkd4LTZszWvvqx8t8rlLFVecIfVaHoh nOr/ohVGMoNYme31zgTfeVjSl68Sdj6gn9k5hROIPZ+MGGZ/3ZprtHJHqcVxinNw dCAsltslYb66+RJpPq3aDKMioFxeuc7H075x9FyiD2SSNEPUAWE2b16zNO9Jr+y5 882wpsig60iJqmDa2sYXP/1E7ZppcKlI5ALuvY26ZO1UhwbHIs/fPJBtzr1LVkty O31MfYIEzuyq2xdS4bA9EJvFc/dcsTyw4g8Mq9wOHFdGtLoyNII=
    =Wokr
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Neil Bothwick@21:1/5 to Ramon Fischer on Thu Oct 6 17:30:01 2022
    On Thu, 6 Oct 2022 17:19:09 +0200, Ramon Fischer wrote:

    And if you like Bash brace expansions; this one is sometimes quicker,
    than tab-completion and removing characters:

        $ mv file.txt{,.bak}
        file.txt.bak
        $ mv file.txt,{bak,img}
        file.txt.img
        $ mv file.txt{img,}
        file.txt

    $ mv -b oldname newname

    If newname exists, it is renamed with a ~ extension.


    -Ramon

    On 06/10/2022 14:45, Neil Bothwick wrote:
    This is probably a case of Dolphin not being a good tool, unless it
    has a built-in command-line?
    $ mv newfile oldfile
    will overwrite the old file in place with the new file with the name
    of the old file.
    And tab-completion makes this a lot quicker than renaming files in a
    file manager.






    --
    Neil Bothwick

    I'll never forget the 1st time I ran Windows, but I'm trying...

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCAAdFiEE8k9T/rX16EJxEKG692eFu0QSMJgFAmM+8xwACgkQ92eFu0QS MJhSog/+PR6HNqBuLC2mwQiij7tX2Dcysc6Ou+tYv695PpSSEGvBJDZ10I16wXW7 cRbhQvtROfE5ztj1l4Bkos/vbaGm5pEJonoFlU9irNY+8Y/E878jNIG/zkHUK9aF fmfsE/kqD0tw7apL/HQABqx7Z0FwDU3O6ZvZpRo1Vs+vSCnA40Iah4dpxFiOeaFK b13cQnXU2OP1W/+IMgks2uNpMlgNQv+50emZ9ZZiVU5Po864UEzFLvQ9uNE3lDm/ zISr8ar/Pc77KnKIWyDFeF216bq8ilIbvyrEgDUUMGZzLBw+CJpyjaOesb35On6t 8BVB0mXYZVtQ7UBNwGXJdirmHT3do0DnNtecyoF7z19eQiiLzYIFckZVKuHrOz+c oJVQOgCRHAeskdsswte44mZL2yW1UT9QIpP4X5y0ByV0Dm+LTUbrvAp6ZaH9l3G7 JWlTD360mfr42KeLzIted++Jh5u+ziK2vWQSoL5boj2bHY8l+13ifx8p7nqbjwka 0Qacxj2GLU0aJyZsFe4hCAG+wXkRLJRZGBKgLsSFxWWw/tURxRC8PthsaxIQndKt reG6zZTQqy4Z8NI2yzRTkTC5FtocAM+rRSPQTN856FStx+wf7pKVMANfII/P4klT rtoXqij7kduDM64uTgAaR2rhtvw7ZHIicKnvsaYGqxTONZm3Lfs=
    =YJgK
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dale@21:1/5 to Neil Bothwick on Thu Oct 6 19:50:01 2022
    Neil Bothwick wrote:
    On Thu, 6 Oct 2022 10:10:52 +0200, Arve Barsnes wrote:

    This is probably a case of Dolphin not being a good tool, unless it
    has a built-in command-line?
    $ mv newfile oldfile
    will overwrite the old file in place with the new file with the name
    of the old file.
    And tab-completion makes this a lot quicker than renaming files in a file manager.


    This is a option I haven't thought of. The mv command is a good
    thought. Next time I have a lot of these to do, I'll try it. It just
    may work. Plus, tab completion would be a nice bonus.


    I know there are many file managers with a built-in terminal, so maybe
    others have similar possible solutions. I saw someone mention midnight
    commander which I believe is one.
    Or you could use a drop-down terminal like Yakuake to give a terminal on demand, whatever program you are using. Yakuake is for KDE, it wraps
    Konsole, but there are GNOME-ish variants too, I wouldn't be without it.



    I look into Yakuake. I've never heard of it before. It's emerging and
    I have to run to town to help a friend.

    Thanks.

    Dale

    :-) :-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dale@21:1/5 to Dale on Sat Oct 8 05:50:01 2022
    Dale wrote:
    Neil Bothwick wrote:
    On Thu, 6 Oct 2022 10:10:52 +0200, Arve Barsnes wrote:

    This is probably a case of Dolphin not being a good tool, unless it
    has a built-in command-line?
    $ mv newfile oldfile
    will overwrite the old file in place with the new file with the name
    of the old file.
    And tab-completion makes this a lot quicker than renaming files in a file
    manager.

    This is a option I haven't thought of.  The mv command is a good
    thought.  Next time I have a lot of these to do, I'll try it.  It just
    may work.  Plus, tab completion would be a nice bonus.


    I just got a couple dozen videos that I want to do what I described
    with.  I used the -v option with mv plus double check in dolphin
    afterwards and so far, it works nicely.  Tab completion makes it really easy.  It's faster than all the properties window, copy, paste and all
    that.  I might add, along with tab completion, I also use the highlight
    and middle click on the mouse.  A faster way to copy and paste when
    needed.  That's a nifty feature of Konsole.


    I know there are many file managers with a built-in terminal, so maybe
    others have similar possible solutions. I saw someone mention midnight
    commander which I believe is one.
    Or you could use a drop-down terminal like Yakuake to give a terminal on
    demand, whatever program you are using. Yakuake is for KDE, it wraps
    Konsole, but there are GNOME-ish variants too, I wouldn't be without it.


    I look into Yakuake.  I've never heard of it before.  It's emerging and
    I have to run to town to help a friend.

    Thanks.

    Dale

    :-)  :-) 



    I installed Yakuake and to me, it looks like Konsole but without the
    menu part at the top.  Other than that, I don't see anything special.  I kinda wish I had a terminal with dolphin or something.  I think there is
    a way but right now, I'm getting the job done.  I'll look into that
    later.  Pretty sure it is under the tool menu.

    Thanks.

    Dale

    :-)  :-) 

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Sat Oct 8 09:05:59 2022
    On Saturday, 8 October 2022 04:44:56 BST Dale wrote:

    I installed Yakuake and to me, it looks like Konsole but without the
    menu part at the top. Other than that, I don't see anything special.

    Once Yakuake is running, F12 will open it in whichever virtual desktop you happen to be and you can continue your work in the terminal within that desktop. I'm not sure what other benefits it has.


    I
    kinda wish I had a terminal with dolphin or something. I think there is
    a way but right now, I'm getting the job done. I'll look into that
    later. Pretty sure it is under the tool menu.

    Thanks.

    Dale

    :-) :-)

    Yes, look at Tools>'Focus Terminal Panel', or Ctrl+Shift+F4. I find this more useful than Yakuake for my typical use case,[1] or more often I just use Shift+F4 to open a new separate Konsole terminal in the same directory as Dolphin happens to be.

    [1] Often I go into a directory which I have already opened in Dolphin and
    then run a series of commands in a terminal, without needing to refer back to dolphin.
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmNBL2cACgkQseqq9sKV Zxl8UBAA0os4qTqWP2QLneQ73hnUtf0brpy1FtCXMS8xso4OWIeO7wmorJ2OzKhG LLLOsDMqoaaA5WV6dSQM4mAnnnC73FYDVJaVoLbHs6lYUwGgCpd3TVyBZYiDDX4p BVP8bd3/y88qKX3hoQuGnXVWH6hvgsD0+hIZysZFDYj6FB7/9ub4Mo5nvcl4j4/k 70TD+/wQB0+H1D2Zi9ucRtt6w1YAr6f3yb6QXL7cyDMYMbSjdu2nm2nCeVtutvUv GaXiEj3ZS3voJhzJf43hu9nbZ+zIBCAo1SYlW9ewUn2zC1b4mwsRCCrPphDDM2kl m+rFA0lXNPmpVemy0Sz1I0Pe9HbL00UBOGNAw+ki893cQBzMPRQ/0epjCRNAPBbM h+5dMAXUzwEoFN2bswYGkihMtwHzb9C09xruO3aiUXUXMs/xEGCQzWSC7JpB4S0M XTq1P9LDA2OjYrS+s6KXrwYE/JN04xuCX+1R7NzrZ7uS6uWaxpD4lfjgjU85geis QZbTHvo4HQWY1th+swUQh8Ko6Icfn17w485deKvPwduQQ5cf/M9w+MrjkaUkYKgE 7JZz908E50/uKUpi/SQbKl48UAU/2rODD+p7ackH3O2On8nUVA6xxN4sU+a5ZuWf 1YMz/MU5/+kY8M3Cld9RG7fKFP+OPimJJ49ORF/oNkj1wip09fc=
    =YbjH
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dale@21:1/5 to Michael on Sat Oct 8 10:20:01 2022
    Michael wrote:
    On Saturday, 8 October 2022 04:44:56 BST Dale wrote:

    I installed Yakuake and to me, it looks like Konsole but without the
    menu part at the top. Other than that, I don't see anything special.
    Once Yakuake is running, F12 will open it in whichever virtual desktop you happen to be and you can continue your work in the terminal within that desktop. I'm not sure what other benefits it has.


    I think since I always have Konsole open and ready, it is easier for me
    to use it.  If I rarely had Konsole open, then that might come in
    handy.  I have Konsole with several tabs open and parked on desktop 3. 
    It's stuck there at all times.  I have 18 virtual desktops and some have specific programs on certain desktops.  Seamonkey web browser is always
    on desktop 1.  Seamonkey email is on desktop 2.  The list goes on.  I'm pretty organized in that way. ;-)


    I
    kinda wish I had a terminal with dolphin or something. I think there is
    a way but right now, I'm getting the job done. I'll look into that
    later. Pretty sure it is under the tool menu.

    Thanks.

    Dale

    :-) :-)
    Yes, look at Tools>'Focus Terminal Panel', or Ctrl+Shift+F4. I find this more
    useful than Yakuake for my typical use case,[1] or more often I just use Shift+F4 to open a new separate Konsole terminal in the same directory as Dolphin happens to be.

    [1] Often I go into a directory which I have already opened in Dolphin and then run a series of commands in a terminal, without needing to refer back to dolphin.

    I have Konsole set to run su - when it opens so that messes up that.  It
    opens and cd's to the directory but wants to run as root.  I guess I
    could find a way to get a root Konsole another way but most of the time,
    I need it as root anyway. On the rare occasion I need it as my user, I
    just su dale and carry on. 


    I will say this, using mv was much easier and faster than my old way a
    bit ago.  Thanks Arve for that suggestion.  It's command line but it
    works well and does exactly what I want.  I was hoping for a GUI method
    but this works. 

    Dale

    :-)  :-) 

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wols Lists@21:1/5 to Dale on Sat Oct 8 11:20:01 2022
    On 08/10/2022 04:44, Dale wrote:
    I might add, along with tab completion, I also use the highlight
    and middle click on the mouse.  A faster way to copy and paste when needed.  That's a nifty feature of Konsole.

    I think that's been part of X since the dinosaurs were around. Try it elsewhere, it works most places, afaik ...

    Cheers,
    Wol

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dale@21:1/5 to Wols Lists on Sat Oct 8 11:30:01 2022
    Wols Lists wrote:
    On 08/10/2022 04:44, Dale wrote:
    I might add, along with tab completion, I also use the highlight
    and middle click on the mouse.  A faster way to copy and paste when
    needed.  That's a nifty feature of Konsole.

    I think that's been part of X since the dinosaurs were around. Try it elsewhere, it works most places, afaik ...

    Cheers,
    Wol




    I think it is gpm or something that makes it work on a regular console
    too.  It's been a long time since I installed it but I think that is the name.  It is nifty tho.  I didn't know about it for a good while.  I
    sort of found it by accident if I recall correctly. 

    I'll keep a eye out for other places tho. 

    Dale

    :-)  :-) 

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Neil Bothwick@21:1/5 to Dale on Sat Oct 8 23:10:01 2022
    On Sat, 8 Oct 2022 03:18:30 -0500, Dale wrote:

    Once Yakuake is running, F12 will open it in whichever virtual
    desktop you happen to be and you can continue your work in the
    terminal within that desktop. I'm not sure what other benefits it
    has.

    I think since I always have Konsole open and ready, it is easier for me
    to use it.

    The key point there is that it opens on the desktop you are using, so if
    you need to refer to the program you are currently using, you have both terminal and program together - that's where I find it useful.


    --
    Neil Bothwick

    There are 10 types of people in this world, those who understand binary notation and those who don't.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCAAdFiEE8k9T/rX16EJxEKG692eFu0QSMJgFAmNB5UgACgkQ92eFu0QS MJiZ/A//fyoNwUyjuYBaMwP1wKLcrOVyV8ykhdVaR8AJShuGXtSnY6bXjoneod6S FRkC3HODTkvyuYWM92xpGZ7z8j4+X0bxf46sNH6LmgfttTzcCQ/8tp5zTl85KIsM vQEN5kKpO5imJjPCVzFh5H9+/AVcjEh7w779kQxq6dr+W1eKPRIJh7HO87oXsBKT XuaExQhLBBh0YLTkAu+3COf1Vri5+BXZqb9DE3l/999r+zz31N5emVWefM+kkv+2 nRRuYYhluC7kLS60hJiKGpSYdZJXUF6DGsw36qdjbN/pHcyF3qpbhmlWIiW+15kI Ig+e14ShL1PAg38NT4R2FLIC0hDFZyraYnjfBErX8Why790Z1npsueq8nx3VKeOS w8MZEP+X0vFUboA2/svREWMxMsv540jQGrbux3P4kOuOtoKeG83AOrvBMlU0jgOm 5ooru5MWpYHhpFA1PS7jbpJFjqAJjdskY5u16oKcsFB8XI0Mz/ntPGFHqAroBmBZ t5qWFGDjt83JgTCLPmPB06z+d+YnD9QQub9LHtOqTOumbvKRnQKOtRnubTS+GUXL x89+khPq9aXGdgG5D+ALfu4Tw6OtNsroclP8G1QDdKRkxBbu8Cp4OjvS37zR2MnY MjUuQzTrkuPTrGj8kZJmdxTxqLOVIHgz52Y1gaTUo9cdhlmoLdg=
    =4CX4
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet U
  • From Frank Steinmetzger@21:1/5 to All on Sat Oct 8 22:40:01 2022
    Am Thu, Oct 06, 2022 at 10:10:52AM +0200 schrieb Arve Barsnes:
    On Thu, 6 Oct 2022 at 06:40, Dale <rdalek1967@gmail.com> wrote:

    Howdy,

    This may not exist. If not, oh well. Sometimes when I'm moving files
    with Dolphin, I need a added feature. I tend to use split panes when I copy or move files. Quite often, I want to move files from one location
    to another and the new file use the same name as the old file I'm replacing. What I *wish* I could do, move the file from one pane to the other and drag the new file on top of the old file and it replace it
    with the name of the old file. As it is now, I have to bring up properties, select the name of the file, while not including the
    extension, and copy it, then close that window and open properties on
    the new file, highlight the old name, paste new name, close window, copy new file over and either delete old file or tell it to overwrite the
    file. Sometimes it has a different extension and I have to delete
    instead.

    This is probably a case of Dolphin not being a good tool, unless it
    has a built-in command-line?

    It has: F4. And the path of that terminal is synced with that of the current file view. That’s something you don’t get with Yakuake.

    1. Equivalent to your method
    - Select old file, F2 (rename), ctrl+c, esc, select new file in other
    pane, shift+F6 (move with rename), ctrl+v, enter

    Shift+F6 only moves without rename—only if the destination already
    exists.

    Dolphin has a „Copy address“ function: Ctrl+Alt+C. It will copy the absolute
    path of a file to the clipboard. Then you can use tab completion in the
    Dolphin terminal at the original file’s location and type:
    mv <Beginning of source file><Tab>
    and then insert the destination. This will at least save you from completion-tabbing through the destination directory.

    --
    Grüße | Greetings | Qapla’
    Please do not share anything from, with or about me on any social network.

    “She understands. She doesn’t comprehend.” – River Tam, Firefly

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEVbE9o2D2lE5fhoVsizG+tUDUMMoFAmNB3nYACgkQizG+tUDU MMqtxg/9HSCXjXo1HJ55nX4a9vswqNV4tsFtWBe8F+a9Oe7SiMx5p/Yg5y336TVG Q26rFmf+/HEMjswF5JHFNobtcpwNShV75+VDiCb6f4IYwkzgpUwPrfl0k2ykv0Jn c/v/WRd8uNajxNvW3jwJFuE7v9Oscr6fxTjOzjlvc7Kj0DVC67jJY+HSpmXW6uOj Ii/UNzKo78RazY1Tuqbf86Zm41tFJhh+I/r7J5koa7CXTzMgFObVPARql+at+e0R 8fMHNXCRewt75Bzm+PA566UQiSr4E6eujSMA+8oi+q2T+gAkadz5MGfWPAF5XpCg SZV335Hi08q4NOySs4HuPy15uLWTKfNPpXajNheQm0QFfvlyBPdGx4bJ4BuNgeNR /jvLaNjH/rBLPwYbblnC329eLInMlAHNDSPefy2+d1O8TJtzYim8l3KojevqtpY6 1hcb1gTCYof4ZInDW5TDtTW0Q3YfaImsMniBUogJ1uQbSP9qmmb9VbLHPGigp+hJ b8PXaEtVN67EkNFVnggBPFtP9uWfRYOoRugOzbMJ94Tf+1zM3IdcXBJhC4MEiqqG Wx10DoW50EN4UQ0q2DKoxRFl1d+ht0iT5fQN5nrEmzIwDuKJZnIt1cvl1cMw9Id6 TwVsdSjfKsGcz3DVhGU7lBuTz6C8yaX7TK1P9/+lNtXKZC4YirQ=
    =WpcW
    -----END PGP
  • From Neil Bothwick@21:1/5 to Dale on Sat Oct 8 23:00:01 2022
    On Fri, 7 Oct 2022 22:44:56 -0500, Dale wrote:

    I installed Yakuake and to me, it looks like Konsole but without the
    menu part at the top.  Other than that, I don't see anything special.  I kinda wish I had a terminal with dolphin or something.  I think there is
    a way but right now, I'm getting the job done.  I'll look into that
    later.  Pretty sure it is under the tool menu.

    It is Konsole, but on demand. I have Konsole open on a separate desktop permanently, but sometime I just want to run a quick shell command and
    can press F12 to do it there and then.


    --
    Neil Bothwick

    I@love~my,;It's%made in Taiwa~##$ ` #@

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCAAdFiEE8k9T/rX16EJxEKG692eFu0QSMJgFAmNB5GoACgkQ92eFu0QS MJjrjg/+KPrQY8YavUSL2fgMUl9bLB6GDqpwNZGghHSGzlGvehq2C+L/CJaJZ+CN aqe302Csvett9S7StXCpxjeEu0e4QVxRXduMoyJRPEWFuISe9+m7W+DqB+WT2Wl6 igHx8qmofuPAhwdl1fcw86p1GOqXC7NzK+PKYPTyLpmZJLG6y6dU0tfCflhwBDUP dYZMKrR7Z0FawDUmZNbAvCrVJOOEbuzXUpXdmssNupU0fSX09zqvUAeH2tnzwASa VvCIUoqQcBrHcII0rpjT4cuCMFTmrLM4/g9gAD+n1HSHlnUvAASJvZ/75K7dTimX E0+je1Wi8h3G2Ukzu1gV4mPPfrKCiNmQIZPYnWUyYc+YDDTvUz0+cl3vcBFN3BYm ww4DwGJVz7O8BC1nRN9ckNg7ZIE0tNPwmin8fY5pEns7R3V4gsJKclOYUGX3jWXK B0P0Cl9/axFwVd4Pgt1ipuRbsIW6sw3M7WS8xKSbXJCQag2xICILy1VO/X9jOxWm VIaii6ZAyNkFT7+28YfRM1U6oMr7xbvrYV1TNsOVnc6yFzqru8EogrJLHlBB8VEs /t7U67eu/nLWhWPOVI2FlQkuR5dihncn0I+QvMmniFr3gz9UDxO+717QSc/V1IX9 fQarw8z3yDhsd1Irq7IE4oLZLTYXpSJd+UXh6m275gYrY5aHCBo=
    =1go2
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Knecht@21:1/5 to rdalek1967@gmail.com on Sun Oct 9 00:30:01 2022
    On Sat, Oct 8, 2022 at 3:15 PM Dale <rdalek1967@gmail.com> wrote:
    <SNIP>
    Good idea for most tho. I'm just a odd ball. lol
    <SNIP>

    Never truer words spoken... ;-)

    Was following your thread because I'm working on a similar project here
    using Plex.

    Cheers,
    Mark

    <div dir="ltr"><br><br>On Sat, Oct 8, 2022 at 3:15 PM Dale &lt;<a href="mailto:rdalek1967@gmail.com">rdalek1967@gmail.com</a>&gt; wrote:<br>&lt;SNIP&gt;<br>&gt; Good idea for most tho.  I&#39;m just a odd ball.  lol<br>&lt;SNIP&gt;<div><br></div><div>
    Never truer words spoken... ;-)</div><div><br></div><div>Was following your thread because I&#39;m working on a similar project here using Plex.</div><div><br></div><div>Cheers,</div><div>Mark</div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dale@21:1/5 to Neil Bothwick on Sun Oct 9 00:20:01 2022
    Neil Bothwick wrote:
    On Sat, 8 Oct 2022 03:18:30 -0500, Dale wrote:

    Once Yakuake is running, F12 will open it in whichever virtual
    desktop you happen to be and you can continue your work in the
    terminal within that desktop. I'm not sure what other benefits it
    has.
    I think since I always have Konsole open and ready, it is easier for me
    to use it.
    The key point there is that it opens on the desktop you are using, so if
    you need to refer to the program you are currently using, you have both terminal and program together - that's where I find it useful.




    I can see where that can be handy. For me, once I start my video moves,
    I just have to type on the first one then after that, I just highlight
    and paste the parts that are the same and use tab completion for the
    rest. It goes pretty fast from there. The other thing, because of how
    I have Konsole set up, it wants to run as root instead of user. I don't
    want to change that so I sort of changed things that make it
    incompatible for me so it is faster to just go to Konsole.

    Good idea for most tho. I'm just a odd ball. lol

    Dale

    :-) :-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arve Barsnes@21:1/5 to Frank Steinmetzger on Sun Oct 9 09:00:01 2022
    On Sat, 8 Oct 2022 at 22:33, Frank Steinmetzger <Warp_7@gmx.de> wrote:
    Am Thu, Oct 06, 2022 at 10:10:52AM +0200 schrieb Arve Barsnes:
    1. Equivalent to your method
    - Select old file, F2 (rename), ctrl+c, esc, select new file in other
    pane, shift+F6 (move with rename), ctrl+v, enter

    Shift+F6 only moves without rename—only if the destination already
    exists.

    Not sure what you mean here, although in essence any "rename"
    operation in this context is always just a "mv" anyway. Maybe you
    missed that I was talking about emelfm2, where shift+F6 lets you
    change the name of the file you want to move before moving it. If you
    change the name to something that exist in the destination, then
    you'll get asked if you want to replace it.

    Regards,
    Arve

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Neil Bothwick@21:1/5 to Dale on Sun Oct 9 09:50:01 2022
    On Sat, 8 Oct 2022 17:15:28 -0500, Dale wrote:

    Good idea for most tho.  I'm just a odd ball.  lol

    You'll get no argument from me ;-)


    --
    Neil Bothwick

    Okay, who put a "stop payment" on my reality check?

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCAAdFiEE8k9T/rX16EJxEKG692eFu0QSMJgFAmNCe9AACgkQ92eFu0QS MJh38RAAutKXAinaeRIxemaCj6K6s0a2u0N1DKFjeKfNGXyqidj72dHBgCXIob8s xhz65d/RSMsBlwA1nASwMlM2BpYsFdy7glgjPzCY8+DqlOguyQ4eSI1l4vW5QjWv 6YPqf+00+k9XCjx4+OcMq/+EC57DIAsA9JwOiXkvSqtTvmjHCThzTwYVk98z9H4Z GAuXnCEDvGFFY4H5GT3mYInPLTMJl8wyID5IssbDYCUEw56UxDDoroTWPAYl7NZw 1qJoT5NntRduVXA6N1++V6i+MRCjfx30AWW696mmn9eqmEu40vMrML+zVeO1X2gi FPve2VF9mWhx2fN0uD6Zc53MenuhNyijJ4dnFBKa+WIJlNcYuMMyzsVF90fptYS7 HY9A2XrsopBOWzFwjy/v1jFGKsP3mPgem3lbNl5oyFP0gI6q1N5gHNmUA9D9SXLB 80pLoC9jYyUk45blSnD/6PqCbQmoI1ZyuRlk8apl7TOn898v5mnD3H63lytcZRnq AiNw1RVef+DfqW4i0KRrzxj4QdjNxXJ9/PsM2WIEtyfZiVIlj+XU+lxDr53bqr/r nNLbv3oaln23AcPXzkRPaQt05KN9GSSffcVEj0Q7T3c7KXzkEO0daCornJF9OTFF fbTP6PW/2KKwLCTw+/4NTY7qou3fbxwoz5iLPuEpyx0vPZ4YpEc=
    =PRFm
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Edwards@21:1/5 to Wols Lists on Mon Oct 10 03:00:02 2022
    On 2022-10-08, Wols Lists <antlists@youngman.org.uk> wrote:
    On 08/10/2022 04:44, Dale wrote:
    I might add, along with tab completion, I also use the highlight
    and middle click on the mouse.  A faster way to copy and paste when
    needed.  That's a nifty feature of Konsole.

    I think that's been part of X since the dinosaurs were around.

    Indeed. X has worked that for the 35 years I've been using it.

    Try it elsewhere, it works most places, afaik ...

    If there's anywhere that doesn't work, then something is broken.

    --
    Grant

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dale@21:1/5 to Dale on Sun Oct 23 08:40:01 2022
    Dale wrote:

    This is a option I haven't thought of.  The mv command is a good
    thought.  Next time I have a lot of these to do, I'll try it.  It just
    may work.  Plus, tab completion would be a nice bonus.

    Thanks.

    Dale

    :-)  :-) 



    Well, I ran into a slight problem.  This isn't much of a problem with
    Linux but I'm not sure how this would work on windoze tho.  The problem,
    if it is one, is the file extension.  Let's say I have a mp4 file that
    is the older original file that I intend to replace.  If the file I
    intend to put in its place is a .mkv file, mv uses the .mp4 extension
    because all it cares about is the name of the file, not what it is or
    its content.  So, I end up with a .mkv file that has a .mp4 extension. 
    It works here on Linux but not sure about windoze and such.

    I looked at the man page and I don't see a way to tell it to retain the extension.  I see something about suffix but I don't think that is
    related to this.  If I just backspace and change the extension, it
    basically moves the file and I end up with both the old and new file.  I
    wish I could write code and create a tool for this.  :/ 

    Is there a way to work around this problem?  It works great except for
    losing the file extension. 

    Thanks.

    Dale

    :-)  :-) 

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Frank Steinmetzger@21:1/5 to All on Sun Oct 23 11:50:01 2022
    Am Sun, Oct 23, 2022 at 01:35:55AM -0500 schrieb Dale:

    Well, I ran into a slight problem.  This isn't much of a problem with
    Linux but I'm not sure how this would work on windoze tho.  The problem,
    if it is one, is the file extension.  Let's say I have a mp4 file that
    is the older original file that I intend to replace.  If the file I
    intend to put in its place is a .mkv file, mv uses the .mp4 extension
    because all it cares about is the name of the file, not what it is or
    its content.  So, I end up with a .mkv file that has a .mp4 extension. 
    It works here on Linux but not sure about windoze and such.

    It’s not a problem for as long as the application you open the file with
    does its own detection. I.e. you feed mp4 to mpv, but it recognises by
    itself that it’s mp4 and can handle it.

    I looked at the man page and I don't see a way to tell it to retain the extension.  I see something about suffix but I don't think that is
    related to this.  If I just backspace and change the extension, it
    basically moves the file and I end up with both the old and new file.  I wish I could write code and create a tool for this.  :/ 

    Is there a way to work around this problem?  It works great except for losing the file extension. 

    If you still want to stick to a terminal solution akin to mv, then there is
    no way around a little script which wraps mv by extracting the extension and filename base. You could also add some “intelligence” with regards to directories, in order to reduce the amount of effort required to use the command—in case your directories follow some schema or are constant.


    #!/usr/bin/sh

    [ "$#" -ne "2" ] && exit 1
    SRC="$1"
    DST="$2"

    SRC_EXT="${SRC##*.}"
    DST_BASE="${DST%.*}"

    # remove destination for the case that the extensions differ
    rm "$DST"

    mv "$SRC" "${DST_BASE}${SRC_EXT}"

    --
    Grüße | Greetings | Salut | Qapla’
    Please do not share anything from, with or about me on any social network.

    “If you enjoy wasting time, is that time really wasted?” – Philosoraptor

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEVbE9o2D2lE5fhoVsizG+tUDUMMoFAmNVDFYACgkQizG+tUDU MMoGTxAAq5SewTujbfy/NoOnbBu7OFV12Oo5qzUvmvdfGaN6B3WXCiJC+CABDnB0 Mx0pDwZBMsU7nm7v/Ta+E/jq23Eh2yXhSj0+ykD2EXx6G7oA4PSnJSkMSbWKdTPZ PZzD3xvoMl3q9eq7Yq/QtiybrCsRlLSJrcL7LluJcnR8YYn61+KhO6P/8/362F8Y DwltqYSqLyvhoXZCz+jFbMoNVtJlIKPXJdw2C1tZ8ib7IgluMju2Us1+fFanlxl/ EqgInYHSSPJwYM4bnY36uClbTe30TjNmYLw4B8HLxeh62ry5HjEH1lXFhQVa+uvk HvZ5ava72hjNPd11pYy7nzIG/5OzDHrHucRiVryY37Vse/arxsoCF449ja3oIrta wtdyil/XMGgXORYTCB3WBLGX/pb87j6qLZ/5F1rtyrG3eRJNcVl7Dtn+sBeo+Xtz NqyurutmvORGt5nEsGdvLpjntPD+nM5Kt0QinlNJi+JAiU2NtLgMP9h4YIPu1fRU Y3OcHGgjvLB/+HgTjocnGVORTcJ3x+dgi+99u5w8t0Ef4XIa8hAwacYe8Wcsjsw7 qIFiraM65Wl2882ZLZ5dno+gT0T72O1QFtQ4GOi6LDBNHtfbs7xUMCtfuQZiq21g cbbD+m8t1jNzO+ouxI5XfkY8vEdQFwiXc1SQnCPjyLHogb5cIss=
    =MzLa
  • From Dale@21:1/5 to Frank Steinmetzger on Sun Oct 23 13:20:01 2022
    Frank Steinmetzger wrote:
    Am Sun, Oct 23, 2022 at 01:35:55AM -0500 schrieb Dale:

    Well, I ran into a slight problem.  This isn't much of a problem with
    Linux but I'm not sure how this would work on windoze tho.  The problem,
    if it is one, is the file extension.  Let's say I have a mp4 file that
    is the older original file that I intend to replace.  If the file I
    intend to put in its place is a .mkv file, mv uses the .mp4 extension
    because all it cares about is the name of the file, not what it is or
    its content.  So, I end up with a .mkv file that has a .mp4 extension. 
    It works here on Linux but not sure about windoze and such.
    It’s not a problem for as long as the application you open the file with does its own detection. I.e. you feed mp4 to mpv, but it recognises by
    itself that it’s mp4 and can handle it.

    That is true on Linux.  Most linux software could care less what the
    extension is or if it even has one.  Heck, you could likely change a
    .mp4 to .txt and it would open with a video player just by clicking on
    it.  Thing is, if I share a file with someone who uses windoze, I'm not
    sure if it would work the same way.  A wrong extension could cause
    problems, either not opening at all or crashing something.  It's
    windoze, one can't expect much.  ROFL 

    I thought about looking to see if there is a way to "scan" a directory
    and look at each file and if needed, change the extension to the correct
    one.  Thing is, I couldn't write a fancy script if my life depended on
    it.  I also looked into using Krename to do it but it refuses to change
    a extension.  Doing it one file at a time manually puts me back to where
    it is easier to change the file the old way.  Time consuming but works. 


    I looked at the man page and I don't see a way to tell it to retain the
    extension.  I see something about suffix but I don't think that is
    related to this.  If I just backspace and change the extension, it
    basically moves the file and I end up with both the old and new file.  I
    wish I could write code and create a tool for this.  :/ 

    Is there a way to work around this problem?  It works great except for
    losing the file extension. 
    If you still want to stick to a terminal solution akin to mv, then there is no way around a little script which wraps mv by extracting the extension and filename base. You could also add some “intelligence” with regards to directories, in order to reduce the amount of effort required to use the command—in case your directories follow some schema or are constant.


    #!/usr/bin/sh

    [ "$#" -ne "2" ] && exit 1
    SRC="$1"
    DST="$2"

    SRC_EXT="${SRC##*.}"
    DST_BASE="${DST%.*}"

    # remove destination for the case that the extensions differ
    rm "$DST"

    mv "$SRC" "${DST_BASE}${SRC_EXT}"



    Hmmmm.  I get a little of that but then I get lost.  Just how does that
    work and how would I use it?  I think I would save that as a file, make
    it executable and then run it with whatever name I give it.  I'm not
    sure exactly how to tell it what files to move tho.  Same as mv maybe? 

    Currently, I move to the main directory that files are in when I am in
    Konsole and running as my user, so file permissions don't switch to
    root.  My process on file organizing goes a little like this.  I have a
    set of videos that go together.  When I have a new version of one or
    more videos, I place them in a sub-directory until they are named
    properly or something so I can move to the main directory.  Like this:

    Main Directory  #Permanent location for files
    ----- Sub-directory  #Temporary location for files needing names changed etc.  Once done, they move up to main directory.


    A typical command for mv would be like this.

    mv sub-directory/<file name of new file> <file name of old file in main directory>

    Just trying to follow this and figure out how to use it.  ;-)  I've said
    this before, my scripting skills are so small it isn't funny.  :/

    Dale

    :-)  :-) 

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Frank Steinmetzger@21:1/5 to All on Sun Oct 23 14:00:01 2022
    Am Sun, Oct 23, 2022 at 06:16:04AM -0500 schrieb Dale:
    Frank Steinmetzger wrote:
    Am Sun, Oct 23, 2022 at 01:35:55AM -0500 schrieb Dale:

    Well, I ran into a slight problem.  This isn't much of a problem with
    Linux but I'm not sure how this would work on windoze tho.  The problem, >> if it is one, is the file extension.  Let's say I have a mp4 file that
    is the older original file that I intend to replace.  If the file I
    intend to put in its place is a .mkv file, mv uses the .mp4 extension
    because all it cares about is the name of the file, not what it is or
    its content.  So, I end up with a .mkv file that has a .mp4 extension.  >> It works here on Linux but not sure about windoze and such.
    It’s not a problem for as long as the application you open the file with does its own detection. I.e. you feed mp4 to mpv, but it recognises by itself that it’s mp4 and can handle it.

    That is true on Linux.  Most linux software could care less what the extension is or if it even has one.

    Mpv or Vlc on Windows will probably just work™, too.

    Heck, you could likely change a
    .mp4 to .txt and it would open with a video player just by clicking on
    it.  Thing is, if I share a file with someone who uses windoze, I'm not
    sure if it would work the same way.  A wrong extension could cause
    problems, either not opening at all or crashing something.  It's
    windoze, one can't expect much.  ROFL 

    Now you’re talking about double-clicking in a file manager and open the registered application. That’s the same—to some extent—on Linux file managers. I was referring to an application that could work out the details.

    I thought about looking to see if there is a way to "scan" a directory
    and look at each file and if needed, change the extension to the correct one.  Thing is, I couldn't write a fancy script if my life depended on
    it.  I also looked into using Krename to do it but it refuses to change
    a extension.  Doing it one file at a time manually puts me back to where
    it is easier to change the file the old way.  Time consuming but works. 

    Well, ther is the `file` tool, plus maybe `mediainfo` or `identify` for
    images. But their output may not always be sufficient.

    If you still want to stick to a terminal solution akin to mv, then there
    is no way around a little script which wraps mv by extracting the
    extension and filename base.

    Hmmmm.  I get a little of that but then I get lost.

    The script first checks wheter it receives exactly two arguments, and exits otherwise. In theory it should also check whether both paths exist and are files. First rule of programming: always sanitise your inputs!

    Now it gets the extension of the source file and the base part (i.e.
    everything without the extension) from the destination. Then it deletes the original destination file and finally moves the source by concatenating the original destination’s base part with the source’s extension part.


      Just how does that work and how would I use it?

    I have a lot of little helper scripts. I collect them in ~/usr/bin, to which
    my PATH is expanded in ~/.bashrc with export PATH=~/usr/bin:$PATH. Actually,
    I keep the script files in git repositories under ~/dev, and then put
    symlinks into ~/usr/bin, which point to the repository file.

    I think I would save that as a file, make it executable and then run it
    with whatever name I give it.

    Exactly.

    I'm not sure exactly how to tell it what files to move tho.  Same as mv maybe? 

    Yes. You give it two arguments. That’s what $1 and $2 are for in the script. I always write my scripts so that they can handle spaces in filenames. I
    find it an anachronism to still use underscores or dots in filenames where spaces would go in normal language. File systems have been able to deal with spaces for decades now.

    Currently, I move to the main directory that files are in when I am in Konsole and running as my user, so file permissions don't switch to root. 

    That’s the proper way to do it. I also have a root console open all the
    time, but don’t do normal file operations in there. The risk is too big that I may be typing too fast for my own good.

    My process on file organizing goes a little like this.  I have a set of videos that go together.  When I have a new version of one or more videos,
    I place them in a sub-directory until they are named properly or something
    so I can move to the main directory.  Like this:

    Main Directory  #Permanent location for files ----- Sub-directory  #Temporary location for files needing names changed etc.  Once done, they move up to main directory.

    I don’t quite understand the formatting of that line. But basically, you
    have a directory for your videos, and in a subdiractory of that, you collect your temporary files?

    A typical command for mv would be like this.

    mv sub-directory/<file name of new file> <file name of old file in main directory>

    OK. That could actually be automated in a way. How many files per directory
    are we talking about? Because one approach I can think of is a managament script. It goes through all the files in your temp subdir, and for each file
    it asks you which file to overwrite in the main directory. It then moves the file, but keeps the extension as in my first script. But this isn’t
    practical if there are dozens of files in the main dir, because you would
    have to scroll through the big selection ist.

    As an example, let’s assume we have the following file tree:

    main
    ├── episode 1.mkv
    ├── episode 2.mpeg
    ├── episode 3.avi
    └── temp
    └── episode 2 with better quality.mkv

    You cd into main, and start the script. It checks for the presence of the
    temp dir and, if it exists, asks for each of its files what to do:

    main$ VideoCleanupScript
    Select file to overwrite with 'episode 2 with better quality.mkv':
    1) episode 1.mkv
    2) episode 2.mpeg
    3) episode 3.avi
    #? 2
    Removing 'episode 2.mpeg'
    Moving file 'episode 2 with better quality.mkv' -> 'episode 2.mkv'

    Just trying to follow this and figure out how to use it.  ;-)  I've said this before, my scripting skills are so small it isn't funny.  :/

    I could write the above script in probably half an hour. Just say when. ;-)

    I, too, have a few scripts that move files around. For example when I edit photo albums, I do a final re-encoding of those images in different JPEG quality levels as a trade-off between quality and storage space. For that I have a script that asks me which level to keep whilst I look at the
    different versions in a viewer. I then decide for one and the script picks
    the appropriate file and moves it into the final folder. The other choices
    are moved away so that if I halt the script midway, I can call it again and pick up where I left it.

    --
    Grüße | Greetings | Salut | Qapla’
    Please do not share anything from, with or about me on any social network.

    Of all the people I’ve met you’re certainly one of them.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEVbE9o2D2lE5fhoVsizG+tUDUMMoFAmNVLEUACgkQizG+tUDU MMp9AA/+Jg/VVm6+VBNRELe3nQF4RDKIhaTtfNcmdjE0u4eFnBh0io0TNG4nzBNb GaDgVwdkNZM4xsfBQUejxifEJgBAnXzuLvWF72gJJkBRs4v8bLolHP3CLalUB63y GdCJ+8XDxBGSSFeWAuea4Mx+sZKFwzsrO30nqAOxrvuFoZY4XgTPifO4V9gBrA46 P3VjWiBpPJbxBW3hs7Xnvnyevq1xZh/YP5hj9tQ+LgzNllyxhVn0fMByYLbl8zVT +KPpHQU9o3H8nTIXm205xOefq5O+XF3v8noCkQa9wfowa+fEg3+nL5hLr6GMFjOE ADUEOQNra2scXagja+Yd/lK3gv76P+d0L5JuxZTq9iFsFqG/APDHDzHwI4McTbza 2QO3I3wcNbAKjnm8UbJ1omko3HB69WvyJ3k1qAe6hN66QYenQ8f1kzvqCkD8GqI+ ZdW91ym2nfxxAxO9BE+wMl0X1OdRePqqPI2kW7/t7QOuy/eoja6KpPnCew1W1B9B a9D9DJq5PzusvZnDN6NZ0nmWxdmkgh6Yh5Gba9jCyOOTZLogGPLRucL3U8R3Ihjg AXnR5/EVLlPmeM8pJ0jqrFRrGZ5CH53qES9WqBCK+7SQY6zqBQshDsiT5RUTet7Z 1jtgnR6XmnaFVsbUBK2DLqWxSLjkyKV70p+2hqkpk9zDaNyICkA=
    =wLJf
    -----END PGP SIGN
  • From Grant Edwards@21:1/5 to Dale on Mon Oct 24 16:00:01 2022
    On 2022-10-23, Dale <rdalek1967@gmail.com> wrote:

    That is true on Linux.  Most linux software could care less what the extension is or if it even has one.  Heck, you could likely change a
    .mp4 to .txt and it would open with a video player just by clicking on
    it.  Thing is, if I share a file with someone who uses windoze, I'm not
    sure if it would work the same way.  A wrong extension could cause
    problems, either not opening at all or crashing something.  It's
    windoze, one can't expect much.  ROFL 

    A friend of mine once spent days trying to re-encode a video file into
    a format that could be handled by a particular windows app. No matter
    what codecs/parameters he tried, the app couldn't open the file. He
    finally figured out that the app in question had hard requirements for
    the filename suffix, and they chose a somewhat non-nstandard extension
    for that container format.

    It turned out that any of the codec/parameter combinations would have
    been fine, it was just the filename that was causing the problem.

    --
    Grant

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Tue Oct 25 00:10:01 2022
    On Monday, 24 October 2022 14:49:46 BST Grant Edwards wrote:
    On 2022-10-23, Dale <rdalek1967@gmail.com> wrote:
    That is true on Linux. Most linux software could care less what the extension is or if it even has one. Heck, you could likely change a
    .mp4 to .txt and it would open with a video player just by clicking on
    it. Thing is, if I share a file with someone who uses windoze, I'm not sure if it would work the same way. A wrong extension could cause problems, either not opening at all or crashing something. It's
    windoze, one can't expect much. ROFL

    A friend of mine once spent days trying to re-encode a video file into
    a format that could be handled by a particular windows app. No matter
    what codecs/parameters he tried, the app couldn't open the file. He
    finally figured out that the app in question had hard requirements for
    the filename suffix, and they chose a somewhat non-nstandard extension
    for that container format.

    It turned out that any of the codec/parameter combinations would have
    been fine, it was just the filename that was causing the problem.

    So the hubris of those two college dropouts still haunts the Windows world. What a legacy.

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Frank Steinmetzger@21:1/5 to All on Tue Nov 22 11:10:01 2022
    Am Tue, Nov 22, 2022 at 03:59:27AM -0600 schrieb Dale:

    If you still want to stick to a terminal solution akin to mv, then there is no way around a little script which wraps mv by extracting the extension and
    filename base. You could also add some “intelligence” with regards to directories, in order to reduce the amount of effort required to use the command—in case your directories follow some schema or are constant.


    #!/usr/bin/sh

    [ "$#" -ne "2" ] && exit 1
    SRC="$1"
    DST="$2"

    SRC_EXT="${SRC##*.}"
    DST_BASE="${DST%.*}"

    # remove destination for the case that the extensions differ
    rm "$DST"

    mv "$SRC" "${DST_BASE}${SRC_EXT}"


    I finally got a chance to try this.  I saved it and made it executable. 
    It runs but gave me this error. 


    dmv torrent/video_name-old-place.mp4 video-name-new-place.mp4
    bash: /bin/dmv: /usr/bin/sh: bad interpreter: No such file or directory dale@fireball ~/Desktop/Crypt/Series $


    My scripting skills are minimal at best.  Still, I kinda got what your script was doing.  Those who have known me for a while understand how miraculous that is.  ROFL  I did some googling.  It seems to not be able to find the 'shebang' part.  Sure enough, sh isn't located in /usr/bin here.  It's in /bin tho.  I edited that line so it can find it.  When I tried it, it worked but noticed another problem. […]

    Well, it would have been boring to provide you with a turn-key solution. ;-) Congrats on getting it working. In my Arch setup, sh is in /usr/bin. A
    flexible solution is to use #!/usr/bin/env sh, which looks the command up before executing it.

    I added a little . on that last line before the extension bit.  I'm a
    happy camper.

    Give me a nudge if you want the more luxurious version with interactive selection of the overwrite destination. I think I already started a
    prototype somewhere, but can’t find it right now.

    --
    Grüße | Greetings | Salut | Qapla’
    Please do not share anything from, with or about me on any social network.

    The best thing about Sundays is Saturday evening.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEVbE9o2D2lE5fhoVsizG+tUDUMMoFAmN8n0UACgkQizG+tUDU MMpcfRAAhRDLWLx86hvbyPpxIcTAkgXL4co9WCmSlaONm/jpu8CVEQvcc2Ttoa6H 6vpWXh+lHFsdvcY6jKBqMWRW/NJCAaE/cg1hZo4H3GPVtKCz9qIl6k34hbdSpn7/ lABp45OFPi3xtEkZa6OR+WQgaf6VxeaOq9S5mcY3IQMNOcfGMLTznFce1zE1Lh/2 jg7WEBcphFVtqvzGd7uEoPVC+57eI3K5Zf+OzjFbq1FhGfZkaGKZMlzXvfroWvDP bQESx5Wg2/evZRB572DETVmqzWPtwtr2s3Bx/Z/OBR/UY+GZrHG5kYF7Cfxhwwwk Ybtze85X4YsGSVpjNd+X4VfHMDAIvHgbxsN7T1vBk2GYsZjpP/fuOdyOuOa1K+Xs w+VHXGSAo/IdvM+gPc0paj4vdSdOXfiGddzBKAkWpxQQvrUaw+zpnVh0dyN7x/8P 7bnZtlatfKF04AQAh8k2V3oUaGosviE/RzAj4aZqWRwLADx1gdXMQNX1iJ79VX6w WueHX3wT0PFX5t+udr567I6JTreumxLBboGTlvZLmkgMJQ8lqDCqtitgvFMcdgJa 3JBya2pegGffQbKeOnLoetyX3V6XlVuUNSpth+CYAFcUiJpUKeo8DAL80tOuJG+u SOq9g8E9Ki6n0Dcx3FaBOpwxzsVf4mb3LlN1ZGCojKx86CG3+MY=
    =Pdmx
    -----END PGP SIGNATURE-----
  • From Dale@21:1/5 to Frank Steinmetzger on Tue Nov 22 11:00:02 2022
    Frank Steinmetzger wrote:
    Am Sun, Oct 23, 2022 at 01:35:55AM -0500 schrieb Dale:

    Well, I ran into a slight problem.  This isn't much of a problem with
    Linux but I'm not sure how this would work on windoze tho.  The problem,
    if it is one, is the file extension.  Let's say I have a mp4 file that
    is the older original file that I intend to replace.  If the file I
    intend to put in its place is a .mkv file, mv uses the .mp4 extension
    because all it cares about is the name of the file, not what it is or
    its content.  So, I end up with a .mkv file that has a .mp4 extension. 
    It works here on Linux but not sure about windoze and such.
    It’s not a problem for as long as the application you open the file with does its own detection. I.e. you feed mp4 to mpv, but it recognises by
    itself that it’s mp4 and can handle it.

    I looked at the man page and I don't see a way to tell it to retain the
    extension.  I see something about suffix but I don't think that is
    related to this.  If I just backspace and change the extension, it
    basically moves the file and I end up with both the old and new file.  I
    wish I could write code and create a tool for this.  :/ 

    Is there a way to work around this problem?  It works great except for
    losing the file extension. 
    If you still want to stick to a terminal solution akin to mv, then there is no way around a little script which wraps mv by extracting the extension and filename base. You could also add some “intelligence” with regards to directories, in order to reduce the amount of effort required to use the command—in case your directories follow some schema or are constant.


    #!/usr/bin/sh

    [ "$#" -ne "2" ] && exit 1
    SRC="$1"
    DST="$2"

    SRC_EXT="${SRC##*.}"
    DST_BASE="${DST%.*}"

    # remove destination for the case that the extensions differ
    rm "$DST"

    mv "$SRC" "${DST_BASE}${SRC_EXT}"


    I finally got a chance to try this.  I saved it and made it executable. 
    It runs but gave me this error. 


    dmv torrent/video_name-old-place.mp4 video-name-new-place.mp4
    bash: /bin/dmv: /usr/bin/sh: bad interpreter: No such file or directory dale@fireball ~/Desktop/Crypt/Series $


    My scripting skills are minimal at best.  Still, I kinda got what your
    script was doing.  Those who have known me for a while understand how miraculous that is.  ROFL  I did some googling.  It seems to not be able
    to find the 'shebang' part.  Sure enough, sh isn't located in /usr/bin
    here.  It's in /bin tho.  I edited that line so it can find it.  When I tried it, it worked but noticed another problem.  It was leaving out the
    dot, ".", before the extension.  Back into the script I went.  I revved
    up my gears for a bit and made a edit.  When I tried it again, I was shocked.  I almost fell in the floor.  Dang thing worked perfectly with
    me only having to edit once.  I really did get how the script works,
    sort of.  O_O 

    This is the script as shown by cat:


    root@fireball / # cat /bin/dmv
    #!/bin/sh

    [ "$#" -ne "2" ] && exit 1
    SRC="$1"
    DST="$2"

    SRC_EXT="${SRC##*.}"
    DST_BASE="${DST%.*}"

    # remove destination for the case that the extensions differ
    rm "$DST"

    mv "$SRC" "${DST_BASE}.${SRC_EXT}"
    root@fireball / #


    I added a little . on that last line before the extension bit.  I'm a
    happy camper.  Only thing is, turns out both source and destination file
    have the same extension in this case.  Still, I bet it will work.  Then
    I thought of a way to test this.  I just changed the extension on the destination file and did a move.  I changed the .mp4 to .mkv on the destination.  When I used your move script, it used the .mp4 extension
    from the original source file but used the old name.  Perfect!!

    Hope this makes the point.  THANK YOU MUCH!!!!

    Dale

    :-)  :-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dale@21:1/5 to Frank Steinmetzger on Tue Nov 22 13:20:01 2022
    Frank Steinmetzger wrote:
    Am Tue, Nov 22, 2022 at 03:59:27AM -0600 schrieb Dale:

    If you still want to stick to a terminal solution akin to mv, then there is >>> no way around a little script which wraps mv by extracting the extension and
    filename base. You could also add some “intelligence” with regards to >>> directories, in order to reduce the amount of effort required to use the >>> command—in case your directories follow some schema or are constant.


    #!/usr/bin/sh

    [ "$#" -ne "2" ] && exit 1
    SRC="$1"
    DST="$2"

    SRC_EXT="${SRC##*.}"
    DST_BASE="${DST%.*}"

    # remove destination for the case that the extensions differ
    rm "$DST"

    mv "$SRC" "${DST_BASE}${SRC_EXT}"

    I finally got a chance to try this.  I saved it and made it executable.  >> It runs but gave me this error. 


    dmv torrent/video_name-old-place.mp4 video-name-new-place.mp4
    bash: /bin/dmv: /usr/bin/sh: bad interpreter: No such file or directory
    dale@fireball ~/Desktop/Crypt/Series $


    My scripting skills are minimal at best.  Still, I kinda got what your
    script was doing.  Those who have known me for a while understand how
    miraculous that is.  ROFL  I did some googling.  It seems to not be able >> to find the 'shebang' part.  Sure enough, sh isn't located in /usr/bin
    here.  It's in /bin tho.  I edited that line so it can find it.  When I >> tried it, it worked but noticed another problem. […]
    Well, it would have been boring to provide you with a turn-key solution. ;-) Congrats on getting it working. In my Arch setup, sh is in /usr/bin. A flexible solution is to use #!/usr/bin/env sh, which looks the command up before executing it.

    I added a little . on that last line before the extension bit.  I'm a
    happy camper.
    Give me a nudge if you want the more luxurious version with interactive selection of the overwrite destination. I think I already started a
    prototype somewhere, but can’t find it right now.



    Feel free to share.  Even if I don't use it, someone else may find it
    and make good use of it.  It's one reason I posted the corrected version
    and why I changed what I did.  Someone else just may run up on this and
    find it helpful as well.  If possible and you have time, describe a bit
    what each part does. 

    Usually when I do this, I have several videos, anywhere from 10 to
    sometimes 30 or more.  Sometimes I wish it could 'detect' which new one
    goes with which old one.  Thing is, I don't know if a script can do this
    or not.  Sometimes the new is named pretty different from the old.  I
    don't think a script could do it reliably.  If things were more
    consistent, maybe, but there is a lot of differences at times.  Your
    scripts at least keeps the extension correct without adding any more
    effort on my part, except having to type dmv instead of mv.  I chose d
    since the first letter of my name is d.  It was something.  lol 

    The current script sure is handy tho. 

    Dale

    :-)  :-) 

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wol@21:1/5 to Frank Steinmetzger on Tue Nov 22 20:20:01 2022
    On 22/11/2022 10:07, Frank Steinmetzger wrote:
    My scripting skills are minimal at best.  Still, I kinda got what your
    script was doing.  Those who have known me for a while understand how
    miraculous that is.  ROFL  I did some googling.  It seems to not be able >> to find the 'shebang' part.  Sure enough, sh isn't located in /usr/bin
    here.  It's in /bin tho.  I edited that line so it can find it.  When I >> tried it, it worked but noticed another problem. […]

    Well, it would have been boring to provide you with a turn-key solution. 😉 Congrats on getting it working. In my Arch setup, sh is in /usr/bin. A flexible solution is to use #!/usr/bin/env sh, which looks the command up before executing it.

    Everything should be in /usr/bin. /bin should be a symlink to /usr/bin I believe.

    People like to blame that on systemd, but actually I believe the
    "change" predates systemd, and certainly has nothing whatsoever to do
    with Lennart.

    Most distros (especially systemd ones) are already there, Gentoo is
    actively migrating in that direction.

    And as someone who got bitten by that - writing a makefile (make
    install) - on Gentoo and then having it blow up on SUSE, that day can't
    come soon enough.

    Cheers,
    Wol

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Frank Steinmetzger@21:1/5 to All on Wed Nov 23 12:40:01 2022
    --1TXAKe06dm1MiOrj
    Content-Type: text/plain; charset=utf-8
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable

    Am Tue, Nov 22, 2022 at 06:17:09AM -0600 schrieb Dale:
    Frank Steinmetzger wrote:

    I added a little . on that last line before the extension bit.  I'm a
    happy camper.
    Give me a nudge if you want the more luxurious version with interactive selection of the overwrite destination. I think I already started a prototype somewhere, but can’t find it right now.


    Feel free to share.  Even if I don't use it, someone else may find it
    and make good use of it.


    There ya goo. As I suspected, I already wrote most of it in October right
    away, I only couldn’t find the file until now. I just had to fix the same bugs as in the first script (and some more in the additional parts :D ),
    and put some more grease into the interal logic and output strings.

    --
    Grüße | Greetings | Salut | Qapla’
    Please do not share anything from, with or about me on any social network.

    “To some degree people say you should not micro-optimise.
    But if what you love is micro-optimisation, that’s what you should do.”
    – Linus Torvalds

    --1TXAKe06dm1MiOrj
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: attachment; filename=Mv

    #!/usr/bin/env bash

    # author: Frank Steinmetzger
    # version: 2022-11-23

    # Helper functions ------------------------------------------------------------

    # oops, something occured and the script must exit with an error message
    die() {
    echo "$PROGNAME error: ${@}" > /dev/stderr
    exit 1
    }

    # move a file after printing an info text
    move() {
    echo " Moving '${1##*/}' -> '$2'"
    mv -f "$1" "$2"
    }

    # print help text
    usage() {
    cat <<-EOF
    $PROGNAME: replace files in one dir with files from another, but keeping the extension

    Synposis: $PROGNAME [-h|-s DIR]
    -h show this help and
  • From Frank Steinmetzger@21:1/5 to All on Wed Nov 23 13:10:02 2022
    Am Wed, Nov 23, 2022 at 05:54:30AM -0600 schrieb Dale:
    Frank Steinmetzger wrote:
    There ya goo. As I suspected, I already wrote most of it in October right away, I only couldn’t find the file until now. I just had to fix the same bugs as in the first script (and some more in the additional parts :D ), and put some more grease into the interal logic and output strings.


    I saved it and then tried to figure it out.  I got lost.  I see the commented sections which kinda help I guess but still got lost. 

    I was kinda verbose on the comments for you. But in the end, you don’t need to
    understand every line of it. ;-) Suffice it to say it won’t syphon off your data to me.


    What does it try to do in simple terms?  Or, how would I use it may be a better question? 

    Look at my mail from 23.10., it has a textual description (the one with the file tree): it basically wraps the old script over all files.

    You have a directory 'A' with videos and a subdirectory 'A/temp' with new videos. Start the script in A and it will go through all files in A/temp and ask you what to do with each – skip (do nothing), keep (move to A without renaming), or overwrite a certain file in A (keeping the extension), which is the same as the old script.

    I been using the other script and it is coming in very handy.  It saves
    me quite a bit of time. 

    --
    Grüße | Greetings | Salut | Qapla’
    Please do not share anything from, with or about me on any social network.

    When I’m old I’ll do nothing but complain. That’ll be a blast.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEVbE9o2D2lE5fhoVsizG+tUDUMMoFAmN+C3AACgkQizG+tUDU MMqcjxAAyvlKwACUHj3+HIQ928q/6noS6D3kRMKBiKtuKp1JJ02QAR/6/s1J8zUD GowgRT1I91MeKLLfpvq2Yaq6aJ1II+QdJcbQH+LrPGPSoVdhFh40eo6q0ZQ43j4L UoJatD25Z1L4Bno4QwBusAtliDwkpsx8yJqvBwCfjI1VPltlmsNPBxm0//9XVYZI VFJLvS0y/urISE/BM+fwCkdao0l9k9T0YMIJFu2VsedZpAC6v50pORM/uLSNvNNa gjbhMtYrvBKHxcQUHH4RxBlEicaPkNiNXKjOJVlSBgxpEOo+OLUD+Pe4wwdKz81t RhUWrPgrF0/mdQBIV+u86WxFQo+AS4yKmyx/q5Qbro7lR8hBlLjxI5ktyzL7tXQh 5WQuOCCGTHk6eJMvsMjiGhNKyQ1c5GgkrfWkVJRlzznc+Kl9qYEcB/k1iLDjNlSm sBi3A3iAzbc6ca0H7n4LY2F858bPpdG4GmOcOLonDDt/MARuFj0KP5ViSoWkYAqo 1TSoA9vBJorAnpWmxZTk0OMRhygZtIFDx8P282k1BzsKV0Rhk1sTXPpfG+oVRNB+ Krv+rLfxMNQEb3RpHZYAQ9BX//18RMzy7RWfXpuxcSzT+Hm2Axs3GPjjl2PCHCNS FP5EwGdXjrDIU0qVGicHkmNPVTXhCRe2Nuga3jsyfxGE/C0ieR4=
    =9eTR
    -----END
  • From Dale@21:1/5 to Frank Steinmetzger on Wed Nov 23 13:00:01 2022
    Frank Steinmetzger wrote:
    There ya goo. As I suspected, I already wrote most of it in October right away, I only couldnt find the file until now. I just had to fix the same bugs as in the first script (and some more in the additional parts :D ),
    and put some more grease into the interal logic and output strings.



    I saved it and then tried to figure it out. I got lost. I see the
    commented sections which kinda help I guess but still got lost.

    What does it try to do in simple terms? Or, how would I use it may be a
    better question?

    I been using the other script and it is coming in very handy. It saves
    me quite a bit of time.

    Dale

    :-) :-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Frank Steinmetzger@21:1/5 to All on Wed Nov 23 14:10:01 2022
    Am Wed, Nov 23, 2022 at 06:16:12AM -0600 schrieb Dale:

    What does it try to do in simple terms?  Or, how would I use it may be a >> better question? 
    Look at my mail from 23.10., it has a textual description (the one with the file tree): it basically wraps the old script over all files.

    You have a directory 'A' with videos and a subdirectory 'A/temp' with new videos. Start the script in A and it will go through all files in A/temp and
    ask you what to do with each – skip (do nothing), keep (move to A without renaming), or overwrite a certain file in A (keeping the extension), which is
    the same as the old script.

    OK.  I think I get it.  It's kinda like dispatch-conf except it is for files not lines in a file.  No 'merge' option tho. Kinda hard to merge a video.  lol 

    I may try that sometime.  I may copy the files to a different location
    just in case I screw up something. It won't be the real files so no harm
    if I botch it.

    Always have a backup. ;-)
    I deny any responsibility for data loss. :-P

    If you want to try it before doing real stuff: you could comment the two
    lines where it says 'mv -f' and 'rm -f'. Then it won’t do anything, but
    there are still progress messages being printed.

    P. S.  Now I'm trying to figure out how to change the resolution of all videos in a directory.  Usually going from 1080p to 720p.  If you have a script for that, awesome.

    I use ffmpeg for all my encoding stuff, and have been using wrapper scripts
    for years now to make things easier. However, none of them has resized yet. It’s not difficult to configure, but the wrapper needs much more logic. As in: find out the current resolution, see if it is actually larger, then calculate the new resolution while keeping the aspect intact and so on.

    I'm currently using handbrake and it works but there may be a better way. 

    I know handbrake by name, have been aware of it for many a year, but never
    used it. In my Windows days I used VirtualDub for my editing stuff, and on Linux I’ve always used commandline tools, beginning with mencoder back in
    the day.

    --
    Grüße | Greetings | Salut | Qapla’
    Please do not share anything from, with or about me on any social network.

    I don’t mind dreaming in a foreign language.
    What bugs me are the subtitles!

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEVbE9o2D2lE5fhoVsizG+tUDUMMoFAmN+GoYACgkQizG+tUDU MMr6nRAAr9dubJuUVmFj89ZpDdFCqNiRc+BrBO66kmNjDdP/P0onWiv/x3B+g1wd CgPYqsOCJ8xKFnMw5dbNbmG8AgV2jo1iivaR0jPluh2Mj/I6f66qSDVPdQPV3fyI FBV0oxLkJHSfXozGtReGI16xBCKW/R0H6IDaFP214m21BKPHZo+6LiY7HkvNLVrA cCSbPGRYk1BsnDiAehukiBX4GVlShxXsE2z7fZMvmxBbrgI2fLZdAf9STXBW7V8c hkJmMO3traQKxsHpiqNKHTNEYsAhemAureZ3OeOM0+4rKbMq66WFBrho/ioiuUNy 40THRCjw5whBWrzSOlrJy/lc0XMHAtXRcge3fNjFRzBZ6ZESAw3gjOXEIO4d+f4W hu8Xs0xzoJCmI/EkbEstztslI4sdL+VtiOs2ypj/G31cdMdSy5w5mW/sm2UedMD0 fTQhlUP2xJMpLxXJBbGb+KA9Q3fsUJDPQlRI0J0qApjLKyQICBdaN9bkx6Sz1Aks GzoTZJEXXKbVH9HUxo6v5PN9J2LOXkm+R4fEhFkvbpK3DHCqSguwEwaBPJLYTB5A 1ajLvEgL33ecIluSg02e7tgSJkyZl6sina+TGfwW2EuIIO8pAPdLEEz/GjlaWFu9 8dZFmNzhklznCtb7Fg/wDGdUAYXC8WnaJY6I8MWPmAghaXveh54=
    =FyFl
  • From Dale@21:1/5 to Frank Steinmetzger on Wed Nov 23 19:20:01 2022
    Frank Steinmetzger wrote:
    Am Wed, Nov 23, 2022 at 06:16:12AM -0600 schrieb Dale:

    What does it try to do in simple terms?  Or, how would I use it may be a >>>> better question? 
    Look at my mail from 23.10., it has a textual description (the one with the >>> file tree): it basically wraps the old script over all files.

    You have a directory 'A' with videos and a subdirectory 'A/temp' with new >>> videos. Start the script in A and it will go through all files in A/temp and
    ask you what to do with each – skip (do nothing), keep (move to A without >>> renaming), or overwrite a certain file in A (keeping the extension), which is
    the same as the old script.
    OK.  I think I get it.  It's kinda like dispatch-conf except it is for
    files not lines in a file.  No 'merge' option tho. Kinda hard to merge a
    video.  lol 

    I may try that sometime.  I may copy the files to a different location
    just in case I screw up something. It won't be the real files so no harm
    if I botch it.
    Always have a backup. ;-)
    I deny any responsibility for data loss. :-P

    If you want to try it before doing real stuff: you could comment the two lines where it says 'mv -f' and 'rm -f'. Then it won’t do anything, but there are still progress messages being printed.

    I update my backups every week.  I'm going to order another hard drive
    in a couple weeks.  I'm looking at a 16TB.  I've got to build a rig so I
    can use LVM on two drives.  That 16TB won't last long with this new
    fiber internet.  I still wish I could back up a large directory and
    split it into two parts.  Have one part be directories starting with A
    through L and second one start with M and go through to Z.  That would
    roughly split it into two pieces.  Then I could use two drives for that directory.  I use rsync but don't know of a way to split it. 

    My biggest concern, I may do the wrong thing and mess up something.  I
    have some videos that are hard to find. 


    P. S.  Now I'm trying to figure out how to change the resolution of all
    videos in a directory.  Usually going from 1080p to 720p.  If you have a >> script for that, awesome.
    I use ffmpeg for all my encoding stuff, and have been using wrapper scripts for years now to make things easier. However, none of them has resized yet. It’s not difficult to configure, but the wrapper needs much more logic. As in: find out the current resolution, see if it is actually larger, then calculate the new resolution while keeping the aspect intact and so on.


    I found commands for it but not a way to process lots of videos.  Right
    now, I use the queue feature of handbrake.  I set up a preset to make it
    the same each time.  I set it to 720p and about 3MB data rate.  Should
    be OK for my 32" TV. 


    I'm currently using handbrake and it works but there may be a better way. 
    I know handbrake by name, have been aware of it for many a year, but never used it. In my Windows days I used VirtualDub for my editing stuff, and on Linux I’ve always used commandline tools, beginning with mencoder back in the day.


    I tried Kdenlive but couldn't figure it out.  It may work better but if
    I can't figure it out, it isn't much help.  lol 

    Dale

    :-)  :-) 

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Thu Nov 24 14:37:08 2022
    On Wednesday, 23 November 2022 18:17:53 GMT Dale wrote:
    Frank Steinmetzger wrote:
    Am Wed, Nov 23, 2022 at 06:16:12AM -0600 schrieb Dale:

    P. S. Now I'm trying to figure out how to change the resolution of all
    videos in a directory. Usually going from 1080p to 720p. If you have a >> script for that, awesome.

    I use ffmpeg for all my encoding stuff, and have been using wrapper
    scripts
    for years now to make things easier. However, none of them has resized
    yet.
    It’s not difficult to configure, but the wrapper needs much more logic. As
    in: find out the current resolution, see if it is actually larger, then calculate the new resolution while keeping the aspect intact and so on.

    I found commands for it but not a way to process lots of videos. Right
    now, I use the queue feature of handbrake. I set up a preset to make it
    the same each time. I set it to 720p and about 3MB data rate. Should
    be OK for my 32" TV.

    It depends how close you sit to the 32" screen. The closer you are the higher the resolution needed to avoid seeing individual pixels. If the size of the file is not important, I'd leave it at 1080p. You never know, you may obtain a bigger TV in the future.

    With ffmpeg you can use its scale filter to retain the same aspect ratio, but reduce the height:

    ffmpeg -i blah-1080.mp4 -vf scale=-1:720 -codec:v libx264 -crf 0 -codec:a aac blah-720.mp4

    NOTES:

    1. Run ffprobe to see what the original video codecs are and use an appropriate video/audio codec to suit your desired output. The video will have to be transcoded to a lower resolution, but the audio can be just copied over.

    2. The -crf controls the quality of the quantizer - default is 23. I've set it at 0 to make it lossless, but this takes longer to process. You could instead use some tuning preset provided in the H.264 encoding guide linked to below:

    https://ffmpeg.org/ffmpeg-filters.html#scale

    https://trac.ffmpeg.org/wiki/Scaling

    http://trac.ffmpeg.org/wiki/Encode/H.264


    Once you find your desired stanza to arrive at some optimal size-quality- processing time, you can modify Frank's script to resize and rename your videos.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmN/gZUACgkQseqq9sKV Zxk8eA//bDr7YONyHNUYjSyUHlIncpXmiWl9hOYPTl8mknVBPZ2qalpipDJ8WpjG EV/52eF5WWS+p5cIdgWn3ipBJnA2yASthWWfNcvOZF3JwJC2IOkMfVFxom6Bo1+k UugHmFTkNxx9iY0eLrXIKzlowa0zWXrsjVHwut1kvQALO2KTg6vuRdcfYV6h5hee ZpNCDjKc4GCgBBftwvMKGIvdp101OWD61Xx8l7+ixzQdOZ+Y2b2LXh0qVnXKkl5I 9Zt7Dhx3tBkojWrMG62rJifmN2IQW2aXysRzu40nwJD5a9lVkWBdlkQNzsgh45A6 gqqIgaNmOkvqMC9owGjCP6N7OQHmYbtWDdxsS/4cJJOuTVXMrhCp4rtNyfLvRP/4 IPq0grBlbnRa7fX0E3naPJzfdiM81Uh2OFvnzKRzjW3mTKmkbj00j/tQcMjnIdmG QWRdaljSMF1mUERKF/GCdHsw6E3gCGGMs2Pi9lE5Oiyc/BpSYPpXjBOzmV6zr1WB i8aGRELBTezicGyMvTjcJozWNsQhthxuudiqS7p7LrNBRrR3sn4JDC36ayBoJYL/ CkYE2t3AWrP3wzTxtaWMSuuMzcnRYze0MTGebgg0mPJ6HgOdYzWcRoLxb4CMuUux c4Az2Y2UUqFF7puUnjwzwe0H2B6BLCXlF/9VLT8Khx0IWp47eL8=
    =RD4V
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)