Re: Your idea on how to detect random directory names

[email protected] (Bruce Gray)
Newsgroups perl.perl6.users
Message-ID <[email protected]>

> On Dec 9, 2023, at 00:37, ToddAndMargo via perl6-users <[email protected]> wrote:
> 
> Hi All,
> 
> I am writing a clean up routine to relive my spot back ups
> of junk in Blink browser directories that are meaningless to
> a backup and that take up a lot of space.
> 
> These directories are long and have random characters
> for files names, such as "adcocjohghhfpidemphmcmlmhnfgikei"
> 
> How who you go about figuring out who was random and
> who was not.  I am thinking first the length and then
> the absence of capitol letters and spaces and underscores.
> 
> Your take?


--snip--

# Brave Browser temp directories: exactly 32 contiguous lowercase alpha characters.
my $brave_junk_directories_re = / ^ <[a..z]> ** 32 $ /;
my %to_skip = @filenames.grep($brave_junk_directories_re).Set;

-- 
Hope this helps,
Bruce Gray (Util of PerlMonks)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.