Batch rename nested files names or file extensions on macOS with ZSH and ZMV

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 พ.ย. 2024

ความคิดเห็น • 5

  • @forestpark1166
    @forestpark1166 3 ปีที่แล้ว +1

    Thanks Ben! this saved me probably a couple hours of hook converting my projects to *.ts. Great stuff!

    • @benfrainuk
      @benfrainuk  3 ปีที่แล้ว

      Great, it’s not the sort of thing you need often but when you need it 👍👍👍

  • @jlp2011
    @jlp2011 วันที่ผ่านมา

    To exclude foo as well, i’d try `(^(node_modules|foo))`. Reasoning: it may be using a regex and `(foo|bar)` matches either foo or bar. Not sure what ^ means here: with regexes it can mean either at start or negation. zmvs not the best documented tool, thats why i watched this. good vid.

  • @tomontheinternet
    @tomontheinternet 3 ปีที่แล้ว

    Hey Ben. Enjoying the channel!
    On Linux you can do
    find . -name '*.css' -exec rename .css .scss {} \;
    This should work on OSX if you brew install "rename"
    The advantage to using find is that this command can be used to do a lot of tasks of this nature.
    Hope you keep making videos. I'm also on Neovim and Colemak. Fun times.

    • @benfrainuk
      @benfrainuk  3 ปีที่แล้ว

      Oooh. That’s handy. Just installed ‘fd’ so I imagine that will have similar functionality. Thanks