in reply to Re: Check if a file exists and if not create it
in thread Check if a file exists and if not create it
Gonna reply to myself while I remember the digression because it was one of those MY LORD, I LOVE PERL moments–
find . -type f | perl -MPath::Tiny -lne '/^(.+?)\?/ && path($_)->move($1)'Finds names like /this/was-not-a/good.aspx?idea=for&a%20filename and turns them into /this/was-not-a/good.aspx.
|
|---|