EliziumNet / RexFs

Regular expression based Bulk File/Directory renamer
MIT License
4 stars 2 forks source link

Rename-Many: Add a PassThru parameter #4

Open plastikfan opened 3 years ago

plastikfan commented 3 years ago

PassThru is a switch which wen enabled passes the resultant file system items to the pipeline. It makes sense to not pass the file system item directory, instead that should be a property on a returned PSCustomObject. This way we can add more items to the object, like whether or not there was a rename (ie the trigger flag). By adding the trigger to the custom object, we can resolve the issue of a batch run where WhatIf is enabled meaning that the renamed item does not actually exist.

So the returned PassThru PSCustomObject will contain the following properties

When WhatIf not enabled:

When WhatIf enabled: