🔒 Closed Batch renaming via PowerShell

Status
Not open for further replies.

XxAccursedxX

Honorary Poster
Diba eto yung code para sa batch renaming sa powershell
Code:
Get-ChildItem *.webp | Rename-Item -NewName { $_.Name -replace '\.webp','.jpg' }

Concern ko po is ano po ba ang idagdag ko sa code na ito or ano po ba ang code para ma rename din ang mga images sa subfolder sa specified na location.
Salamat po sa sasagot..:)
 
Salamat lods try ko po

recursively renaming

Get-ChildItem -File -Recurse | % { Rename-Item -Path $.PSPath -NewName $.Name.replace(".webp",".jpg")}
Salamat lods!!..:) working po may konting alteration lang
Code:
Get-ChildItem -File -Recurse | % { Rename-Item -Path $_.PSPath -NewName $_.Name.replace(".webp",".png")}
 
Salamat lods try ko po


Salamat lods!!..:) working po may konting alteration lang
Code:
Get-ChildItem -File -Recurse | % { Rename-Item -Path $_.PSPath -NewName $_.Name.replace(".webp",".png")}

Well your current code is actually can be replace the *.webp with -File -Recurse

Get-ChildItem *.webp | Rename-Item -NewName { $_.Name -replace '\.webp', '.jpg' }

Get-ChildItem -File -Recurse | Rename-Item -NewName { $_.Name -replace '\.webp, '.jpg' }
 
pwede rin para hindi lahat, pansin ko pati mga mp4 ko naging jpg haha

Ah so no need na yung path?

try ko gagana ba

di nagwork pero di bale na..:)
 
Status
Not open for further replies.

About this Thread

  • 7
    Replies
  • 526
    Views
  • 3
    Participants
Last reply from:
awing

Trending Topics

Online now

Members online
676
Guests online
2,456
Total visitors
3,132

Forum statistics

Threads
2,331,953
Posts
29,261,378
Members
1,147,919
Latest member
hertz1321
Back
Top