Search the Community
Showing results for tags 'mass'.
-
For anyone like me who started off creating their library of media and and deciding at a later date that maybe they want to move the those movies into their own folders, but don't want to manually create thousands of folders, and then manually move the files, you can automate that process with PowerShell (on WIndows). Open up a PowerShell prompt and navigate to the directory with your movies being stored, in my case on a network share. cd \\unraid\media\movies Make sure this command will create a folder for every file in the directory you just navigated to. WARNING, I was lazy when I made this. This will technically create a folder for any object in the folder that has a period in the name. So, if for whatever reason, you already have folders with a period in the name, it will try to create a folder for it as well. If you already have a folder structure with periods, either don't use this or revise the command. Get-ChildItem | Where-Object {$_.Name -Like "*.*"} | Select BaseName | ForEach-Object {New-Item -Name $_.BaseName -ItemType "Directory"} This next command will actually move every item with a period in the name, into a folder of the same name, minus the file extension. So, if you have multiple copies of a movie, with multiple resolutions, or if you keep your metadata in NFO files, ALL of those files will be moved into the same folder. Get-ChildItem | Where-Object {$_.Name -Like "*.*"} | ForEach-Object {Move-Item $_.Name $_.BaseName}
- 10 replies
-
- 1
-
-
- powershell
- windows
- (and 9 more)