From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B5AC7158020 for ; Sun, 23 Oct 2022 11:16:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DBAA5E08C8; Sun, 23 Oct 2022 11:16:08 +0000 (UTC) Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8672FE0894 for ; Sun, 23 Oct 2022 11:16:08 +0000 (UTC) Received: by mail-qk1-x730.google.com with SMTP id f8so4698615qkg.3 for ; Sun, 23 Oct 2022 04:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:to:subject:from:to:cc :subject:date:message-id:reply-to; bh=BWQxAYFYcPI8AspLJ6T7sqzp9EJS4ntrftWSGGYSsBU=; b=Hzk5jvi4rW6Q0reccVDp2e1bIiyADxpGVIqovnety/NKICLURxgAEzpa8SzsQFp4IO gRhb9l2icoYjXIOV3HhhqasGedAXlL0hN0ovEIJiNQxYnoTULd+xgXsJv0aTVmYwWy6J o4tqjeL5mSIYX22BQOxgfUys8OJF6NsLFMUu1iGAR28pXdok6aXaojhEMHU5jii2G/HU dtPNWJ+hlHPABxDlhHgKlG5P1QFj02YRKydzWKmugCQQu6apGB+ZO4DFShTMmVpl/CSG M4BQoDioju8i87wQAOXbXTc59KIxb/pC0U7IaWzX0qQSbYhWN2RTOA09HyY4DkNX97+B Bv4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BWQxAYFYcPI8AspLJ6T7sqzp9EJS4ntrftWSGGYSsBU=; b=q5d5Wa9gheNJ/RSLJOfocFMoPVNS+MybMHvCK9PkEXchhcM4j4rumK5CpOcaE99fHh R8GsxNFZmg7G4tJHhm5lPbaAEvVpy1She0/UIkuyi/ssimVkLE4le+1EfmYenKABNCRv ZEUj5hJJRjqP6SVJEAgmT4nJNJb95YsQYCphNfgj71C+C7tiXlfLN0lbWtPe3j+BRykb JUcBQnnQ2964LhhdTfI3z6ECpL9qSeodIfiQx7oQSlFdpf3MLsF2roKMMouNqanbTwtv 4DgtBtoAt6MCiXbilg2srTYCglUyhZT8omV3908Pq/UQlgeAibXbXgt/m3mh8KqxwbCa S6Pg== X-Gm-Message-State: ACrzQf0edbIYQ4XvHwGjvkPTZOUdZbc2sOHGfgLetD1IjbY8rUzk7yFu 6R7c91b09tmahZTttyAud+4= X-Google-Smtp-Source: AMsMyM4JmB+diJc1Zv/HL/v6/iGsMauHMOJHrrWuZ75GxEdTXRGhBWzN+bz28Nak6dIahXP5vih+nw== X-Received: by 2002:a05:620a:f03:b0:6cf:c0a1:20bc with SMTP id v3-20020a05620a0f0300b006cfc0a120bcmr19465035qkl.663.1666523767575; Sun, 23 Oct 2022 04:16:07 -0700 (PDT) Received: from [10.8.8.4] ([107.179.20.204]) by smtp.gmail.com with ESMTPSA id bi17-20020a05620a319100b006eeca296c00sm3185294qkb.104.2022.10.23.04.16.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 23 Oct 2022 04:16:07 -0700 (PDT) Subject: Re: [gentoo-user] Dolphin and adding a option, if it exists. To: gentoo-user@lists.gentoo.org References: <6ef36d93-4d8a-d9a4-ca71-396040103a25@gmail.com> <20221006134500.6f0812b9@digimed.co.uk> <62ebaa87-f750-b233-f8b4-ee50ef00bdfa@gmail.com> From: Dale Openpgp: preference=signencrypt Autocrypt: addr=rdalek1967@gmail.com; prefer-encrypt=mutual; keydata= mQINBGFSciYBEADcEGMyJBSuavKO/XKUVvgkxck7Nl8Iuu8N2lcnRji/rSKg5c1Acix1ll9i oW8JBCHwvn0+Xy60BvEsqcup3YSHw5STl/bR1ePEehtnYrg8FdjdS91+B805RfnKMm69rFVI wLSBHQrSG1yxHd8CloWoEdhmVtP24buajbh114bgXd9ahtpZrCVMrWdWYUg2mEXguGV5uNAh Rf8SWxDNc79w24JxsV34a8niMUYMjzWr0rafIbzk732X38vGjVMLo/2mMpkbp9mPp++LHoY+ 0Pet8zxxdXPJSCd475kza1AD+hhSyBZXB9yknYWgyY3cZe1rGmooJSi2KX4QxO7npwLThcO1 be6KKRkd35+Fi/a1BzVOHsZMiK/gcwxEFoMd27gir4ehaeHJfFXl+65w4hj0EsOZSxrJrm2C R50g5By2czSKP1bADEygFNpIJj51AR+wM88NImG2RPtlT2maYBzazvF05g65cdHXGp1C7W5P wwwKU2DgABB2t7N7z5A69LnryBRw4zUYDRRYLTYlBlYgg+xILm2c0OrBdxJgLJa7JE50Eo25 d3PFwt9J0gYvqy6sPFLl9So0sDg9zm0hKQtXOP5kgropUFGrNoJI+mjwF4rYLRBVzZwNAvlO OhEvHubBo3mEllv4x+FeptwXZxlk7gUsdqI8AxnFB8K9wi6FVQARAQABtBtEYWxlIDxyZGFs ZWsxOTY3QGdtYWlsLmNvbT6JAk4EEwEIADgCGyMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AW IQQSG1h01ruv/WNXc3Q3RqOgiQH1GwUCYVJy8gAKCRA3RqOgiQH1G+waEACeTZCt77jnRAmQ AV7otKuZekDWiLi3Eig8tj5ZJiCNSYA/hIxzmexRP0GMqjitcXK1iGwWcvMz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 2022 06:16:04 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 SeaMonkey/2.53.14 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 70ad39e5-1686-4901-b409-3b0da5efa7a7 X-Archives-Hash: 290add9e504ac0a4cd266faf5743d598 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/ 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 :-)  :-)