Skip to content

Instantly share code, notes, and snippets.

View neilscudder's full-sized avatar
💭
Content

Neil Scudder neilscudder

💭
Content
  • UK
  • 04:26 (UTC +01:00)
View GitHub Profile
### Keybase proof
I hereby claim:
* I am neilscudder on github.
* I am neilscudder (https://keybase.io/neilscudder) on keybase.
* I have a public key ASBVThl928LV4a1_wDSMV4l6qvDsdWgBD-fKPlWT-Rp1uQo
To claim this, I am signing this object:
@neilscudder
neilscudder / fileOrganizer.bsh
Last active September 3, 2015 18:43
Sort TV episode files into new folders.
#!/bin/bash
main()
{
local FILE
local NEWDIR
local WORKINGDIR="."
for i in "$WORKINGDIR"/*; do # Loops through all files
[ -d "$i" ] && continue # Skips directories
FILE=$(basename "$i") # Extracts filename from path
# Next line skips files without pattern like S01E09, S10E11 etc.