I have created a batch file for copying all the dll files from a folder into the c:\windows folder. Below is my batch file.
ECHO. THE FOLLOWING BATCH FILE WILL COPY ALL DLL FILES FROM A FOLDER TO WINDOWS FOLDER
XCOPY C:\A1 Folder\*.* "C:\Windows\*.*" /s /y
But it is NOT copying the dll files. My operating system is Windows 7. What is wrong in it ?
Thanks in advance.
- Edited by uksoftengg Tuesday, August 16, 2011 2:09 PM modified
uksoftengg wrote:>>I have created a batch file for copying all the dll files from a folder>into the c:\windows folder. Below is my batch file.Don't do that. This is an incredibly bad idea that will cause you pain inthe future. The Windows folder is protected for a very good reason. Leavethe DLLs in your program's directory.Have you looked at a Windows system recently? The Windows folder is notused to hold DLLs. System DLLs belong in System32; user DLLs belong in thesame directory as the program that is using them.Please -- the standards were created for a reason. FOLLOW THEM.Is this a 64-bit system? If so, then there are even more rules toconsider.>@ECHO OFF>ECHO. THE FOLLOWING BATCH FILE WILL COPY ALL DLL FILES FROM A FOLDER TO WINDOWS FOLDER>PAUSE>XCOPY C:\A1 Folder\*.* "C:\Windows\*.*" /s /y>ECHO COMPLETED>PAUSE>>>>But it is NOT copying the dll files.Of course not, because you are missing quote marks around the name "A1Folder". The correct command would be:xcopy /s /y "c:\A1 Folder\*.*" C:\WindowsBut again, I caution you not to do this. This It is not good programmingpractice.--Tim Roberts, firstname.lastname@example.orgProvidenza & Boekelheide, Inc.
Tim Roberts, DDK MVP Providenza & Boekelheide, Inc.