ani-cli icon indicating copy to clipboard operation
ani-cli copied to clipboard

Create directory if needed

Open Derisis13 opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. Currently if you want to download to a specified folder (flag -p) and the folder doesn't exist, the download fails

Describe the solution you'd like Detect if folder doesn't exist, and create it (using mkdir -p). Or we don't create a folder at all, but exit right on startup with an error message. Or default to current folder (with a verbose warning).

Describe alternatives you've considered Using mkdir without the -p flag might be more stable

Additional context Feature was discussed on discord

Derisis13 avatar Aug 15 '22 23:08 Derisis13

mkdir without -p is considerably worse since in a directory tree A/B/C mkdir A/B/C/D/E will fail while with mkdir -p it will create any intermediary folders without problem

port19x avatar Aug 17 '22 06:08 port19x

One line is.. [ -d dummy ] || mkdir dummy

CoolnsX avatar Aug 19 '22 18:08 CoolnsX

how to use ani-cli -d mkdir -p dummy in windows?

candrapersada avatar Sep 22 '22 00:09 candrapersada