How to copy a file to system32 in the windows folder on drive C

Source: Internet
Author: User

Now, we want to copy 'finaldata.exe'{'officediary.exe'{'displayx.exe 'from "C: \ Program Files \ commonly used green software \ soft \ Program" to 'C: \ WINDOWS \ system32' and overwrite the original three programs, how should I write it ???
Question 1: Does batch writing support long folders and long file names?
Question 2: Does batch writing support Chinese folders?
Question 3: Will a prompt be displayed when overwriting the original file? If yes, how can I make it overwrite without prompting it?
@ Echo off for % a in (FinalData OfficeDiary DisplayX) do (copy/y "C: \ Program Files \ commonly used green software \ soft \ % a.exe" "C: \ WINDOWS \ system32 ") pause: How to Write batch processing when copying multiple files from a Chinese folder to a specified long file name
Bytes --------------------------------------------------------------------------------------------------------------
Copy the three files in one folder on the desktop to the system32 folder in the windows folder on drive C.
Copy the three files dbnetlib. dll dbnmpntw. dll ntwdblib. DLL in the "ERP Database client file" on the desktop to the windows \ system32 folder on drive C, and overwrite the original three files.
I just need such a batch. Thank you.
1.
@ Echo off
Ren % windir % \ system32 \ dbnetlib. dll dbnetlib. old
Ren % windir % \ system32 \ dbnmpntw. dll dbnmpntw. old
Ren % windir % \ system32 \ ntwdblib. DLL ntwdblib. old
Cd/d "% userprofile % \ Desktop \ ERP Database client file"
Copy/y dbnetlib. dll % windir % \ system32 \
Copy/y dbnmpntw. dll % windir % \ system32 \
Copy/y ntwdblib. DLL % windir % \ system32 \
Exit
Rename the original file. Copy the file at the same time. If you do not want to retain the original file, delete the "ren" line.
2.
@ Echo off
Copy % USERPROFILE % \ Desktop \ ERP Database client file \ dbnetlib. dll + dbnmpntw. dll + ntwdblib. DLL % windir % \ system32/y
Exit
3.
@ Echo off
Copy/y "" % userprofile % \ Desktop \ ERP Database client file \ dbnetlib. dll "C: \ windows \ system32 \"
Copy/y "" % userprofile % \ Desktop \ ERP Database client file \ dbnmpntw. dll "" C: \ windows \ system32 \"
Copy/y "" % userprofile % \ Desktop \ ERP Database client file \ ntwdblib. DLL "C: \ windows \ system32 \"
Exit
4.
Copy/y "% homepath % \ Desktop \ ERP Database client file \ dbnetlib. dll" c: \ windows \ system32 \
Copy/y "% homepath % \ Desktop \ ERP Database client file \ dbnmpntw. dll" c: \ windows \ system32 \
Copy/y "% homepath % \ Desktop \ ERP Database client file \ ntwdblib. DLL" c: \ windows \ system32 \
Each section above is a row. Do not create two rows when copying them to bat.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.