r/PowerShell • • 8h ago

Question help with a script that replaces all images in a certain folder with a different images

Hi, I've been trying to find a script that works for this, and everything I've tried hasn't worked yet. I've tried a couple things from google searches (this and this were the two sources I used) and neither of them work and I have NO CLUE how to edit it so it works for me. so i figured I might as well ask in here because I am not a coding expert by any means :-(

Basically I am just looking for help on creating a script that would essentially replace all files in the folder ExampleName with ExamplePng.png . sorry if this is a really simple thing to do I just don't feel like manually moving liek 4047130 pngs (this is for a game mod for context), like I said I'm level 1 noob at code and have no clue what I'm doing so I'd really appreciate any help, thank you!!!!!

1 Upvotes

3 comments sorted by

2

u/BlackV 8h ago

Replacing stuff is always risky, make sure you are taking backups first

Basically I am just looking for help on creating a script that would essentially replace all files in the folder ExampleName with ExamplePng.png

this is not a very good example, ti looks like you are saying, if i have a folder called folder 1 with 100 files in it, replace all those files with 1 file called folder 1.png

layout your folder structure (source and destination), layout the file structure, give actual examples

it would seem odd a mod require this level of replacement, maybe a total conversion ? I dunno it's been a while, but probably the game and the mod would be useful info to have

-3

u/No_Crab_4093 7h ago

Feel like Claude can easily provide you this answer