title: Create new Directories with Bash Script
body: <p>I'd like to create a script to run every hour (with crontab) to make a folder with the name of any file with the correct extension (minus the extension) and move that file into it. So the end result would be the script would execute, find every .mp4 file in /Directory, create a folder for each of them with the same name as the file (minus extension) in /Other/Directory, and move the file into the matching folder. I can understand not wanting to write something for someone for free, but if you could point me in the right direction, I would really appreciate it.</p>
  <p>EDIT: Thanks to @Barmar for the help!</p>
  <pre><code>#!/bin/bash
  
  cd &quot;/home/kali/Videos&quot;
  for FILE in *;do
      bn=$(basename $FILE .mp4)
      mkdir /home/kali/Videos/$bn;done
      mv $bn.mp4 /home/kali/Videos/$bn
  </code></pre>