Friday, 29 March 2019

Using split in powershell to get remove part of the filename

In order to change filenames in bulk using string you can use split switch to filter out first part of the file name.
For example, when I need to cut of "car" part of the file name, then I can use

get-childitem|%{$newname=$ -split ("car")|select -Last 1;Rename-Item $ -NewName $newname}

1 comment:

  1. We suppose that the procedure is not time consuming and we will be successfully end it as soon as possible. Let me just give it a first try.