mv selected file to new location
Posted: 18 Dec 2010 08:47
Hi.
I thought I knew basic DOS scripting but apparently not.
I'm trying to add a line to an existing script that will move the selected file(s) to a new drive (M:) when the first part of the script is complete.
(I currently right click the desired file(s) and "send" them to the .bat file)
As part of that exercise, I made a sample script consisting of only the following.
And then I dragged a few test files onto the bat file.
It failed, of course, attempting to recreate (I guess) the entire file path of the selected file inside the M: drive.
Now looking at this line, you will see all sorts of problems.
But after using google for an hour, I can't find a single piece of documentation that describes how to use mv and %1 together.
I surrounded certan parts with quotes, I tried tildes... a little bit of everything!
What am I missing?
Thanks
I thought I knew basic DOS scripting but apparently not.
I'm trying to add a line to an existing script that will move the selected file(s) to a new drive (M:) when the first part of the script is complete.
(I currently right click the desired file(s) and "send" them to the .bat file)
As part of that exercise, I made a sample script consisting of only the following.
Code: Select all
mv %1 M:\
And then I dragged a few test files onto the bat file.
It failed, of course, attempting to recreate (I guess) the entire file path of the selected file inside the M: drive.
Now looking at this line, you will see all sorts of problems.
But after using google for an hour, I can't find a single piece of documentation that describes how to use mv and %1 together.
I surrounded certan parts with quotes, I tried tildes... a little bit of everything!
What am I missing?
Thanks