• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

I need help with a .bat file.

Flpoolboy

New Member
Joined
Jul 16, 2019
Messages
5 (0.00/day)
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 think he wants to replaces files not rename them
 
oh, i thought he meant extension change... oopsie!
 
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>
 
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.
 
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.
 
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
 
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".
 
For future reference, there is xcopy too which has a lot more options.
 
Back
Top