This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# alpha-organize.sh | |
##################### | |
# The following script is to help organize a directory of directories into alphabetical groups based on their initial characters | |
# This is useful for organizing a large directory of movies into alphabetical groups for easier importing into Radarr | |
##################### | |
# Set the source directory - this is the directory that contains the movies to be organized, this directory should contain only directories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$items = gci .\ -Recurse -File -Include *480p*, *720p*, *1080p* | |
foreach($item in $items) { | |
if($item.Name -like "*480p*") { | |
Move-Item -LiteralPath $item 'G:\path\480p' | |
} elseif($item.Name -like "*720p*") { | |
Move-Item -LiteralPath $item 'G:\path\720p' | |
} elseif ($item.Name -like "*1080p*") { | |
Move-Item -LiteralPath $item 'G:\path\1080p' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set to true to test the script | |
$whatIf = $false | |
# Remove hidden files, like thumbs.db | |
$removeHiddenFiles = $true | |
# Get hidden files or not. Depending on removeHiddenFiles setting | |
$getHiddelFiles = !$removeHiddenFiles | |
# Remove empty directories locally |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
sortTorrentsByTracker.ps1 | |
Sort .TORRENT files into subdirectories named after the tracker indicated in the file | |
Place this powershell script inside your /torrents directory, run the script and wait. | |
When finished, you will find all torrents organized into sub directories per tracker. | |
#> | |
$allfiles = gci "*.torrent" | |
$ToNatural= { [regex]::Replace($_, '\d+',{$args[0].Value.Padleft(20)})} # Define natural sort method |
NewerOlder