Grzegorz Brzęczyszczykiewicz, permalink
Aloha,
pasirodo Free Commander XE turį įdėta multi-rename opciją. Valanda mano
gyvenimo ciuickiui į Odegą.
Jei kam prireiks ...
--
Grzegorz
Chrząszczyrzewoszyce, powiat Łękołody
Muti -rename |
Grzegorz Brzęczyszczykiewicz, permalink
Aloha,
pasirodo Free Commander XE turį įdėta multi-rename opciją. Valanda mano
gyvenimo ciuickiui į Odegą.
Jei kam prireiks ...
--
Grzegorz
Chrząszczyrzewoszyce, powiat Łękołody
wiza, permalink
Directory Opus irgi turi
On 2023-06-19 00:17, Grzegorz Brzęczyszczykiewicz wrote:
Aloha,
pasirodo Free Commander XE turį įdėta multi-rename opciją. Valanda mano
gyvenimo ciuickiui į Odegą.Jei kam prireiks ...
Laimis, permalink
Grzegorz Brzęczyszczykiewicz rašė:
Aloha,
pasirodo Free Commander XE turį įdėta multi-rename opciją. Valanda mano
gyvenimo ciuickiui į Odegą.Jei kam prireiks ...
Na, kodėl iš karto į odegą, kai yra dar penkta koja...? :-)
Prisiminti shell'o sintaksę – verta valandinio prokrastinaišin grieko
(ir satisfakcija garantuota).
Silpnumo akimirką, kai prisireikia greitai pataisyti/pervadinti tuntus
failų kartai kyla pagunda „gal jau čia kokį multi-rename GUI tūlzzzą
pasileisti“, tačiau viskas laimingai baigiasi find/(power)shell ir
galbūt net greičiau (net ir su pasimanualinimu), nei anojo paieškos ir
bandymai...
Powershell'as:
$What = "MM28-DP-"
$With = "MM28-01-DP-"
Get-ChildItem -Path <DIR> -File | where { $.Name -match "^${What}" |
foreach {
$new = $ -replace $What, $With
Write-Info "Preview: moving $_ to $new"
#$_.MoveTo($new)
}
Kas gerai, kad interaktyvu ir gana (aki)vaizdu kiekviename žingsnyje.
Na ir aišku klasika:
find <DIR> -type f -name "MM28-DP-*" -exec rename.sh "{}" "MM28-DP-"
"MM28-01-DP-" ;
$ cat rename.sh
file="$1"
find="$2"
repl="$3"
dir=$(dirname $file)
old=$(basename $file)
new=$(echo $old | sed -E "s|$find|$repl|")
if [ $? -eq 0 ]; then
if [ "$new" = "$old" ]; then
echo "Can't rename $old (filename hasn't changed)"
elif [ -e "$dir/$new" ]; then
echo "Can't rename '$old' to '$new' (file already exist)"
else
echo "Renaming '$old' to '$new' in $dir"
mv "$dir/$old" "$dir/$new"
fi
fi
p.s. Taip, dar yra rename.ul (util-linux), prename (perl rename), mmv
Grzegorz Brzęczyszczykiewicz, permalink
2023-06-19 12:48, Laimis rašė:
Na, kodėl iš karto į odegą, kai yra dar penkta koja...? :-)
Prisiminti shell'o sintaksę – verta valandinio prokrastinaišin grieko
(ir satisfakcija garantuota).
tik ne tuomet, kai "čįa tik keletas failų..."
Silpnumo akimirką, kai prisireikia greitai pataisyti/pervadinti tuntus
failų kartai kyla pagunda „gal jau čia kokį multi-rename GUI tūlzzzą
pasileisti“, tačiau viskas laimingai baigiasi find/(power)shell ir
galbūt net greičiau (net ir su pasimanualinimu), nei anojo paieškos ir
bandymai...
Aš silpnumo akimirką bandau rašyti URL saitų validatorių. Nes yra
įtarimas, kad bando išsisukti nuo sutarto darbo, o įrodymų neturiu.
Va tik per MS Auth'ą (msal ? ) praeisiu kada nors ...
Get-ChildItem -Path <DIR> -File | where { $.Name -match "^${What}" |
foreach {
$new = $ -replace $What, $With
Write-Info "Preview: moving $_ to $new"
#$_.MoveTo($new)
}
gal ... gal man GĖJ interfeiso užteks.
p.s. Taip, dar yra rename.ul (util-linux), prename (perl rename), mmv
dėl keliasdešimt failų eisiu ir kelsiu virtualią mašina ...
:)
--
Grzegorz
Chrząszczyrzewoszyce, powiat Łękołody
Laimis, permalink
Grzegorz Brzęczyszczykiewicz rašė:
tik ne tuomet, kai "čįa tik keletas failų..."
dėl keliasdešimt failų eisiu ir kelsiu virtualią mašina ...
Dariau prielaidą, kad cygwin'as (jei ne wsl'as) pas mesje jau seniai... ;-)
Grzegorz Brzęczyszczykiewicz, permalink
2023-06-19 23:26, Laimis rašė:
Grzegorz Brzęczyszczykiewicz rašė:
tik ne tuomet, kai "čįa tik keletas failų..."
https://youtu.be/huA7IR5J3uY
Ygzektli.
Ir dar "Žiūrėk, žvaigždutė krenta. Sugalvok norą"
dėl keliasdešimt failų eisiu ir kelsiu virtualią mašina ...
Dariau prielaidą, kad cygwin'as (jei ne wsl'as) pas mesje jau seniai... ;-)
wsl'as ne taip ir senai, cygwin'as ... nepatiko jis man.
O be to "čįa tik keliasdešimt failų", "Na taip, keliose vietose po
keliasdešimt".
"
Every twenty miles or so there was a little stone hut with showers
and sanitary facilities, but the going was tough, and the high sun baked
down on the Great Red Plain, and the Great Red Plain rippled in the heat.
“Is it possible,” asked Arthur at one of the larger booths, “to rent
one of those little scooters? Like the one Lajestic Ventrawhatsit had.”
“The scooters,” said the little lady who was serving at an ice cream
bar, “are not for the devout.”
“Oh well, that's easy then,” said Fenchurch, “we're not particularly
devout. We're just interested.”
“Then you must turn back now,” said the little lady severely, and
when they demurred, sold them a couple of Final Message sunhats and a
photograph of themselves with their arms tight around each other on the
Great Red Plain of Rars.
...
They had been staring at it for fully ten minutes before they became
aware that Marvin, hanging between their shoulders, was in difficulties.
The robot could no longer lift his head, had not read the message. They
lifted his head, but he complained that his vision circuits had almost gone.
They found a coin and helped him to the telescope. He complained and
insulted them, but they helped him look at each individual letter in
turn, The first letter was a “w”, the second an “e”. Then there was a
gap. An “a” followed, then a “p”, an “o” and an “l”.
Marvin paused for a rest.
After a few moments they resumed and let him see the “o”, the “g”,
the “i”, the “s” and the “e”. The next two words were “for” and “the”.
The last one was a long one, and Marvin needed another rest before he
could tackle it.
It started with an “i”, then “n” then a “c”. Next came an “o” and an
“n”, followed by a “v”, an “e”, another “n” and an “i”.
After a final pause, Marvin gathered his strength for the last stretch.
He read the “e”, the “n”, the “c” and at last the final “e”, and
staggered back into their arms.
“I think,” he murmured at last, from deep within his corroding
rattling thorax, “I feel good about it.”
The lights went out in his eyes for absolutely the very last time ever.
Luckily, there was a stall nearby where you could rent scooters from
guys with green wings.
"
--
Grzegorz
Chrząszczyrzewoszyce, powiat Łękołody