Date: Thu, 16 Feb 2023 18:45:09 +0100 From: Ralf Mardorf <ralf-mardorf@riseup.net> To: questions@freebsd.org Subject: Re: remove double quote character from file names Message-ID: <b5783d95932ac5a3f1f7bca0180826ce4f65203c.camel@riseup.net> In-Reply-To: <20230216135811.d4ba5a8c.freebsd@edvax.de> References: <d83c93ad-0eac-d41a-c7db-79a1e1bc62d8@nethead.se> <1398045780.627028.1676532009651@ichabod.co-bxl> <20230216112431.8252a3d4.freebsd@edvax.de> <20230216104927.c96efd845f0714a998b7ae9f@sohara.org> <20230216135811.d4ba5a8c.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, how about uncritical chars, excepted of the ", for example a"lnum.txt . Renaming without interaction is unsafe, since a duplicated name will overwrite an existing name, but with interaction, it could be an endless task. Instead of removing the " or replacing the " by another char, the only alternative that is safe and unlikely requires much time consuming interaction, is replacing the " by something like $(openssl rand -hex 4) but this results in odd file names like a6c41752dlnum.txt or by adding -n+1, e.g. alnum.txt-1001 . I wouldn't try to rename thousand of files, to get rid of " in file names. What if e.g. a script needs to read a"lnum.txt ? From where do come all the " in the file names? Maybe by sharing files with apps from different operating systems? If so, will a"lnum.txt renamed to alnum.txt-1001 become a"lnum.txt-1001 after sharing again?=20 Regards, Ralf
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b5783d95932ac5a3f1f7bca0180826ce4f65203c.camel>