This project has moved and is read-only. For the latest updates, please go here.

am i just dumb?

Topics: question
Nov 26, 2012 at 2:43 AM

new to this and powershell.

i set the execution policy.

i run the script with -whatif, it doesnt  create any logs despite saying it is.

my only script edits are

  • <log_path>D:\wtvrenamer\logs</log_path>
  •  <recordings>D:\Recorded TV\</recordings>

here is sample console output

What if: Performing operation "Output to File" on Target "D:\wtvrenamer\logs\Log
Property 'Data' cannot be found on this object. Make sure that it exists.
At D:\wtvrenamer\WTV-MetaRenamer.ps1:2688 char:49
+                     foreach ($episode in $episodes. <<<< Data.Episode)
    + CategoryInfo          : InvalidOperation: (.:OperatorToken) [], RuntimeE
    + FullyQualifiedErrorId : PropertyNotFoundStrict

What if: Performing operation "Output to File" on Target "D:\wtvrenamer\logs\Log
What if: Performing operation "Output to File" on Target "D:\wtvrenamer\logs\Log


Nov 26, 2012 at 12:02 PM

The -whatif option stops PowerShell from actually doing anything. This is why the logs aren't being created.

It could be argued that the logs should be created regardless of this setting, and the -whatif option should only apply to the actual processing of the files. I can certainly look to see if that is possible (it will depend on whether or not I can override -whatif on specific commands).

I'm not sure what is causing the error you are seeing. It looks like the XML for the episode information didn't load.

Can you please confirm which version of the script you are running? You may find it more helpful to run the script with -interactive instead as this will provide more debugging output.