In Reply to: RE: Nope!, Never had that problem ....................... posted by kh6idf on September 29, 2020 at 16:23:22:
Got the powershell working - with some help from google - to find all the music files on a drive and record the full pathnames into a .csv.
A bit more to do but pshell will handke the inventory solution no problem, although the actual pshell code is slower than using dos cmd.
Some directories on my C drive are inaccessible without special pw, so I added the "ignore errors" so the process will not abort when it does not have permissions to access a file or folder.
Here is the pshell code.
Get-ChildItem -path c:\ -Recurse -File -Include *.wav,*.m4a,*.flac,*.dff,*.dsf,*.aac -ErrorAction SilentlyContinue |
Select-Object FullName,LastAccessTime,Extension |
Export-Csv C:\temp\test.csv -NoTypeInformation
Here are a few example lines extracted from the .csv result
====================================================================
C:\Users\Lt\Music\Qobuz\Warren-Zevon\Stand-In-The-Fire\1_7_Warren-Zevon_The-Sin-_6.flac 7/8/2020 8:51:04 PM .flac
C:\Users\Lt\Music\Qobuz\Warren-Zevon\Stand-In-The-Fire\1_8_Warren-Zevon_Poor-Poor-Pitiful-Me-_6.flac 7/8/2020 8:51:07 PM .flac
C:\Users\Lt\Music\Qobuz\Warren-Zevon\Stand-In-The-Fire\1_9_Warren-Zevon_Ill-Sleep-When-Im-Dead-_6.flac 7/8/2020 8:51:09 PM .flac
C:\Users\Lt\Music\01_Suicide_is_Painless_from_MASH.flac 5/27/2019 10:27:30 AM .flac
C:\Users\Lt\Music\02_Knockin?_on_Heaven?s_Door_from_Pat_Garrett_and_Billy_the_Kid.flac 5/27/2019 10:27:30 AM .flac
C:\Users\Lt\Music\03_Evergreen_from_A_Star_is_Born.flac 5/27/2019 10:27:30 AM .flac
C:\Users\Lt\Music\04_On_the_Road_Again_from_Honeysuckle_Rose.flac 5/27/2019 10:27:30 AM .flac
C:\Users\Lt\Music\05_Tender_Years_from_Eddie_and_the_Cruisers.flac 5/27/2019 10:27:27 AM .flac
C:\Users\Lt\Music\06_Footloose_from_Footloose.flac 5/27/2019 10:27:27 AM .flac
C:\Users\Lt\Music\07_Take_My_Breath_Away_from_Top_Gun.flac 5/27/2019 10:27:28 AM .flac
C:\Users\Lt\Music\08_It_Had_to_be_You_from_When_Harry_Met_Sally.flac 5/27/2019 10:27:28 AM .flac
======================================================================
My c drive is 500gb and almost full. The pshell took 350 secs which I know is slow.
Still have to add the code for the unique drive id so it will be in the .csv with each file entry. That way drive letter changes as I plug external drives in and out are irrelevant and can be ignored.
And I will change the output to insert all the data into a Sql Server DB instead of a .csv but that will be easy for me.
After inventory solution is completed, have to think about next phase (how to reorganize files using the inventory data).
This post is made possible by the generous support of people like you and our sponsors:
Follow Ups
- RE: Nope!, Never had that problem ....................... - LtMandella 13:15:10 09/30/20 (3)
- RE: Nope!, Never had that problem ....................... - rivervalley817 13:26:03 09/30/20 (2)
- RE: Nope!, Never had that problem ....................... - LtMandella 14:16:30 09/30/20 (1)
- RE: Nope!, Never had that problem ....................... - rivervalley817 14:22:16 09/30/20 (0)