mirror of
https://github.com/alexandrebobkov/Components.git
synced 2024-10-05 20:47:47 -04:00
.
This commit is contained in:
parent
5d28e7c1af
commit
5454115c16
17
assets/rename.ps1
Normal file
17
assets/rename.ps1
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Renames files
|
||||||
|
|
||||||
|
Written by: Alexander Bobkov
|
||||||
|
Date: Sep 15, 2024
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
# Script
|
||||||
|
Get-ChildItem -Path . -Filter "*.txt" | forEach-Object {
|
||||||
|
Rename-Item -Path $_.Name -NewName $_.Name.Replace("txt", "bat") -Verbose
|
||||||
|
Write-Host $_.Name
|
||||||
|
}
|
||||||
|
|
||||||
|
# One-liner
|
||||||
|
#Get-ChildItem -Path . -Recurse -Include "*.txt" | Rename-Item -NewName { $_.Name -replace ".txt", ".bat" }
|
Loading…
Reference in New Issue
Block a user