Open coot402 opened 4 years ago
I will take a look now.
@coot402 what version of powershell do you have? I just validated that it is working for me on 5.1 You can check your version with this command: Get-Host | Select-Object Version
I'm guessing it is less than 5.1, if you are on 4 would you be able to upgrade to 5.1 to test? You can get it here: https://www.microsoft.com/en-us/download/details.aspx?id=54616
I just pushed a new version so it will check for Powershell 5.1, if that doesn't fix the issue let me know and I will re-open.
OK So when you said it worked for you with PS 5.1, I was like what the hell I was running 5.1 as well? So I threw a few movies into the Movie folder and and a few shows into the Shows folder (I only had 1 in the Shows folder previously) and the script ran perfectly. I tried testing out how many files had to be in each folder. But seems 3 or more.
Also you forgot the GB in
$MovieSize = 2B,
and handbreak is spelled wrong through out. Should be HandBrake
Awesome script Thanks
Thanks for replying! If you are already on 5.1 then it's possible there was just nothing that was larger than the size. I will add a check in for that and fix HandBrake. Thanks for that!
@coot402 thank you again for all the info I can replicate the problem with only one file in each of the two folders. Still looking into that because it makes no sense lol.
Yeah makes no sense to me either.
Another thing that I noticed, when I map a drive, an extra \ gets thrown in there. For example I mapped a drive (Z:) to a folder with a couple test files. I had to take the \ out from line 143 and 147.
From: $OutputFile = "$($File.Directory)\$($File.BaseName)-NEW.$Format" To: $OutputFile = "$($File.Directory)$($File.BaseName)-NEW.$Format"
Andy Couture Windows Engineer NTT Global Data Centers Americas, Inc. (Formerly RagingWire Data Centers) O: 916-286-4038 M: 916-877-5404 E: acouture@ragingwire.commailto:acouture@ragingwire.com www.ragingwire.comhttp://www.ragingwire.com/
[A picture containing drawing Description automatically generated] This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. This communication may contain material protected by the attorney-client privilege or other privileges or protections from discovery. If you are not the named addressee, please notify the sender immediately by e-mail that you have received this e-mail by mistake, do not disseminate, distribute or copy this e-mail, and delete this e-mail from your system.
From: Rocketcandy notifications@github.com Sent: Wednesday, May 27, 2020 4:27 AM To: Rocketcandy/VideoFileResizer VideoFileResizer@noreply.github.com Cc: Andy Couture acouture@ragingwire.com; Mention mention@noreply.github.com Subject: Re: [Rocketcandy/VideoFileResizer] method named 'op_Addition (#7)
[EXTERNAL EMAIL CAUTION]: This email originated from outside of the organization. Do not click links, respond or open attachments unless you recognize the sender and know the content is safe. Contact support if you have concerns about this email.
@coot402https://github.com/coot402 thank you again for all the info I can replicate the problem with only one file in each of the two folders. Still looking into that because it makes no sense lol.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Rocketcandy/VideoFileResizer/issues/7#issuecomment-634598041, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHELEJUAZ6PD62F3ZB3M2CTRTT2ILANCNFSM4NIPHXJA.
If I start with a fresh copy of the VideoFileResizer.ps1 and only make changes to the directories for handbreak (Handbrake) and ffmpeg, I get the following error.
Method invocation failed because [System.IO.FileInfo] does not contain a method named 'op_Addition'. At C:\HandBrake_CLI\VideoFileResizer.ps1:116 char:1