🔒 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
  • 517
    Views
  • 3
    Participants
Last reply from:
awing

Trending Topics

Online now

Members online
1,460
Guests online
3,212
Total visitors
4,672

Forum statistics

Threads
2,308,483
Posts
29,185,422
Members
1,192,016
Latest member
alanwww
Back
Top