0

I am currently working on a batch file (let's call it temp.bat). I am trying to move the batch file to my desktop, but I can't find my batch file location / directory. I am asking if there is an extension or something that can use to automatically identify the directory, instead of entering it every time. In other words, I can still move the file to another place even in another directory. Example:

temp.bat is currently on my Downloads file. I use the move command to move the file to Desktop. Now temp.bat is currently on my Documents file. I try to use the same command to move the file to Desktop.

Is there any parameter extensions for it?

This is what I have now:

@echo off move /y [The directory of temp.bat] C:\Users\69Swag\Desktop 

All answers appreciated! Thanks :)

1
  • Maybe this could help Commented Nov 12, 2014 at 15:07

1 Answer 1

1

You don't need the current directory to move a file.

move temp.bat C:\Users\69Swag\Desktop 

If you still want the current directory, use this:

echo %cd% 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.