From bb707d03d8ac9baffb091b1de73be6006eb502aa Mon Sep 17 00:00:00 2001 From: ashagg1976 <64381406+ashagg1976@users.noreply.github.com> Date: Wed, 3 Jun 2020 04:31:32 +0530 Subject: [PATCH] added maxdepth so it does'nt screw up the existing folders --- Create-a-Folder-for-Each-Movie.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Create-a-Folder-for-Each-Movie.md b/Create-a-Folder-for-Each-Movie.md index 3e8a421..7e33530 100644 --- a/Create-a-Folder-for-Each-Movie.md +++ b/Create-a-Folder-for-Each-Movie.md @@ -33,7 +33,7 @@ I used a program called [Files 2 Folder](http://www.dcmembers.com/skwire/downloa ```sh cd /path/to/your/movies/files/ -find . -name "*.mkv" -exec sh -c 'mkdir "${1%.*}" ; mv "${1%}" "${1%.*}" ' _ {} \; +find . -maxdepth 1 -name "*.mkv" -exec sh -c 'mkdir "${1%.*}" ; mv "${1%}" "${1%.*}" ' _ {} \; ``` # Windows & Linux