Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy one file over another

Status
Not open for further replies.

xwb

Programmer
Jul 11, 2002
6,828
GB
From a DOS prompt, I can do

copy aa.txt bb.txt

If bb.txt exists, it overwrites it with aa.txt. Is there a simple way of doing the same thing in explorer? I normally have to do the following

right click bb.txt, select delete
right click aa.txt, select copy
right click on explorer background, select paste
In exporer window, F2 "copy of aa.txt", type bb.txt

Seems very long winded for a clicky interface. Is there a simpler way to achieve this?
 
Perhaps if you elaborated the reason for doing this task, a solution to tailor to your needs could be met. Are you doing this just locally on your machine or are you trying to do this in a large environment and want a batch file or something to basically automate it for you?

"Silence is golden, duct tape is silver...
 
It is basically a test system. What I normally do is create a batch file with

set /p variant=
copy xxx%variant%.ini xxx.ini

I was wondering whether there was an equivalent in explorer where I could do something like drop xxxone.ini over xxx.ini to overwrite xxx.ini with xxxone.ini
 
You are copying a file with one directory, which limits what you can do.
A batch file would do it for you, if the file names were consistent.

Using a sub folder, you can have 2 aaa.txt files and then just copy to your target folder. The system will ask if you want to make a copy with new name, overwrite old file or ignore.
 
Thanks - maybe that is a better way of doing it: to have subdirectories for the different configurations.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top