System cannot find specified path

Asked

Viewed 1,627 times

-5

I am trying to create a script to configure Opengl in Dev-Cpp automatically. But I’m getting the message "the system can’t find the specified path".

The file code . bat is this below:

echo off
cls
@echo.
@echo   Batch para copiar a biblioteca glut32.dll
@echo   para dentro das pastas do sistema 
@echo   na configuração do OpenGL no Dev-Cpp
@echo.

pause

copy glut32.dll "C:\Windows\system\"
copy glut32.dll "C:\Windows\System32\"
copy glut32.dll "C:\Windows\SysWOW64\"

pause

What is wrong?

  • 2

    Paul the OS is a question and answer site, unlike a forum. So, you can post the solution as the answer to your question, and that is highly recommended. Then, take advantage and remove the solution of the question and post as answer (marking as accepted), as well as reference to other people :-)

  • @Aticuno has no answer in the question! The answer I posted down there myself. The question is: What’s wrong? (What’s wrong with my code, which isn’t working). The answer to that is down there. Could you tell me where I put some ANSWER in my question???

  • Question was edited 1/11/16 at 20:06, my comment was on 14/03/16. There was yes answer in the question, just click on the history of editing and see, my comment is obsolete, Oce did not check the date of it and the date that posted the answer?

  • @Atucuno Truth! Sorry!

1 answer

0


Solved!

@echo off

copy "%~dp0glut32.dll" "%WinDir%\System\"
copy "%~dp0glut32.dll" "%WinDir%\System32\"
copy "%~dp0glut32.dll" "%WinDir%\SysWOW64\"

pause

In which %~dp0 indicates the address of the directory the batch is in and %WinDir% indicates the address of the Windows folder.

  • 1

    Dear Paulo, it wasn’t me who said no, but it would be interesting if you explained what it means %~dp0 and %WinDir%, After all, we are not a support forum but a Q&A in order to add knowledge, if explaining the code will surely be useful to future visitors.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.