Im looking for a way to copy 1 file chnage the name and place it in the same location.
So I.E. i have dat1.dat I want to copy it at dat2.dat, but if there is already a dat2.dat i want to delete dat2.dat and replace. i have yet to find a useful command to do that.
I also want to be able to reverse it. and go form dat2.dat to dat1.dat but i can create the seperate for that from revirse engineering thee first. I would appreciate the help. Im just using the bat for help in a game im creating using java. Im primarily a java/c++ programmer so i will greatly appreciate any help ypou can provide in this batch code.
Copy/Rename
Moderator: DosItHelp
Re: Copy/Rename
move /Y dat1.dat dat2.dat
Re: Copy/Rename
Ty. i will test in a second. I am having a lil trouble on another side as I am working from a server and not directly form the computer. I am moving the folder im working in form the server to the computer to see if thats my issue. Again I appreciate the help.
After moving from the server. I am still having a problem that i get a message saying "The system cannot find the file specified." the file is in the same folder as the bat
After moving from the server. I am still having a problem that i get a message saying "The system cannot find the file specified." the file is in the same folder as the bat
Re: Copy/Rename
Thank you I found the error. first off it was having trouble becuse the first time i ran it it just renamed the file and overwrote it. but deleted the original. so dat1 became dat2 and there was no dat1 after finishing. i changed move = copy and now it works. I appreciate the help. And I will contiue to come to this site for my batch help.