I need help with a .bat file.

Flpoolboy

New Member
Hi, I was wanting to make a .bat file so that when you open it replaces a certain file with a different file, the files im trying to replace are .png's and .mesh's.

Athlonite

I think he wants to replaces files not rename them

Lorec

oh, i thought he meant extension change... oopsie!

jmcslob

I used something like this on 7 to remove then retrieve TV guide data.

bug

Hi, I was wanting to make a .bat file so that when you open it replaces a certain file with a different file, the files im trying to replace are .png's and .mesh's.
I'm not sure I understand the question, but if I do you need:

`copy /y <replacing_file> <file_to_be_replaced>`

jmcslob

I'm not sure I understand the question, but if I do you need:

`copy /y <replacing_file> <file_to_be_replaced>`
Yeah.. Run that in an Event for your script

Hellfire

So copy command as already said,

copy /y (copies & suppresses prompts)
or
copy /-y (copies & allows confirmation prompts for overwriting)

Only thing I would say, I don't like copy overwriting with batch files as if there is an issue (a copy is corrupt) then you lose your original.

What is the copying for or how does it work, I'd possibly suggest a more complex but also safer method where the originals are moved, data is copied (not replacing the originals) and then the originals can be deleted at a later date (ie two days later maybe by the batch file)

But depends, you've not given details on what it's for.

Flpoolboy

New Member
Is there a way to just copy a file to a specified path?

Flpoolboy

New Member
I tried to do copy but I kept getting syntax error.

bug

I tried to do copy but I kept getting syntax error.
Ok, tell me where's the file you want to copy and where's the file you want to replace and I'll give you the copy command.

Flpoolboy

New Member
Source: C:\Program Files (x86)\Roblox\Versions\version-8ea9490e0ca04991\content\textures

Target : C:\Users\flpoo\OneDrive\Desktop\Roblox Skin Changer\MAIN FILES\faces\Epic Face

bug

`copy /y "C:\Program Files (x86)\Roblox\Versions\version-8ea9490e0ca04991\content\textures\*.*" "C:\Users\flpoo\OneDrive\Desktop\Roblox Skin Changer\MAIN FILES\faces\Epic Face"`

I think "textures" is actually a folder. If it isn't, then instead of "textures\*.*" just write "textures".

Flpoolboy

New Member
Thank you so much!

bug

FordGT90Concept

"I go fast!1!11!1!"
For future reference, there is xcopy too which has a lot more options.