I have CSV file that has some information like below.
How can I remove the full path and have just the folder name and folder size information and output results back to csv file. I am new to PS and would appreciate any help on how to accomplish this.
FolderName Size(GB) Size(TB)
vms:\192.168.0.1.@222\Some-Datacenter\Volume-00\file-path\Folder1 111 GB 0.11 TB
vms:\192.168.0.1.@222\Some-Datacenter\Volume-00\file-path\Folder2 121 GB 0.12 TB
vms:\192.168.0.1.@222\Some-Datacenter\Volume-00\file-path\Folder3 131 GB 0.13 TB
vms:\192.168.0.1.@222\Some-Datacenter\Volume-00\file-path\Folder4 141 GB 0.14 TB
vms:\192.168.0.1.@222\Some-Datacenter\Volume-00\file-path\Folder5 151 GB 0.15 TB
Desired Output Example:
FolderName Size(GB) Size(TB)
Folder1 111 GB 0.11 TB
Folder2 121 GB 0.12 TB
Folder3 131 GB 0.13 TB
Folder4 141 GB 0.14 TB
Folder5 151 GB 0.15 TB