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

Trending Topics

Online now

Members online
1,149
Guests online
1,728
Total visitors
2,877

Forum statistics

Threads
2,293,192
Posts
29,082,285
Members
1,208,708
Latest member
ukguy2k
Back
Top