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

Online now

Members online
1,042
Guests online
1,009
Total visitors
2,051

Forum statistics

Threads
2,277,035
Posts
28,973,836
Members
1,229,694
Latest member
juannn_
Back
Top