Find all files of type

This commit is contained in:
2024-05-15 21:48:10 +02:00
parent 0d8d09d392
commit c63628919d
2 changed files with 12 additions and 2 deletions

View File

@@ -11,3 +11,9 @@ MIX_ENV=prod mix release
``` ```
The built binary will be in `_build/prod/rel/bakeware/find_old_mp3s` The built binary will be in `_build/prod/rel/bakeware/find_old_mp3s`
## Usage
```shell
_build/prod/rel/bakeware/find_old_mp3s "~/**/*.{mp3}"
```

View File

@@ -2,8 +2,12 @@ defmodule FindOldMp3s.Main do
use Bakeware.Script use Bakeware.Script
@impl Bakeware.Script @impl Bakeware.Script
def main(_args) do def main(args) do
IO.puts "Hello, World!" path = args
|> Path.expand
Path.wildcard(path) |> Enum.each(fn path -> IO.puts(path) end)
0 0
end end
end end