copy - Batch: Relative directory/path -


I made a small harmless batch virus (a mischief), it's finished (on USB), but I'm not Wanted to manually copy it and then I ran for a problem ...

There is a way to copy files relatively, where is the actual batch file?

Something like this :

Copy "~ Virus.bat" "% appdata% / microsoft / windows / start Menu / programs / startup "

instead of

copy" g: \ files \ folder 1 \ folder 2 \ virus.bet ""% appdata % / Microsoft / windows / start menu / program / startup "

If someone can help you ... thanks < / Strong>!

can solve your problem, but a small answer to copy your file Using% ~ dp0 As stated, this will give you the current path.

Try it:

  Copy "% ~ dp0Virus.bat" "% appdata% / microsoft / windows / start menu / program / startup"  < / Pre>  

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -