Batch file help

K

Kamek

The problem is that U:\ is the remote nas I want to copy stuff to
and I'm assuming if its run from the location I want to copy stuff from
copy blah.mov copys it from local dir which it does so it does make
sense because it works mostly right now. The problem is I dont want to
copy the whole dir, just the mov wav and m2v. The only problem with it
right now is it wont copy the wav or m2v if you say mybat.bat video.mov
it trys to get video.mov.wav/m2v. All I was asking is how to take off
the .mov part thats given it as %1 from the command line. I tryed
%1:~-4,4% but that makes %1= just the last 4 chars of the file name not
take off the last 4 because I'm assigning file extensions within the
script but I want it to work from within windows explorer via file
assosciation. So I want to be able to right click or double click a
single .mov then copy it from the local dir the bat resides in to u:\
and u:\media.dir. Anyone know if a batch script is the wrong way to go
here? Maybe another piece of software someone could recommend. I could
do it in C# but I assumed it would have been easier in batch script but
now I'm not so sure.
 
R

Rock

The problem is that U:\ is the remote nas I want to copy stuff to
and I'm assuming if its run from the location I want to copy stuff from
copy blah.mov copys it from local dir which it does so it does make
sense because it works mostly right now. The problem is I dont want to
copy the whole dir, just the mov wav and m2v. The only problem with it
right now is it wont copy the wav or m2v if you say mybat.bat video.mov
it trys to get video.mov.wav/m2v. All I was asking is how to take off
the .mov part thats given it as %1 from the command line. I tryed
%1:~-4,4% but that makes %1= just the last 4 chars of the file name not
take off the last 4 because I'm assigning file extensions within the
script but I want it to work from within windows explorer via file
assosciation. So I want to be able to right click or double click a
single .mov then copy it from the local dir the bat resides in to u:\
and u:\media.dir. Anyone know if a batch script is the wrong way to go
here? Maybe another piece of software someone could recommend. I could
do it in C# but I assumed it would have been easier in batch script but
now I'm not so sure.

You need to post to the same thread. Making a new post puts your message
out of context and senseless. If you can't find your post, search for it
using Google Groups advanced search. The newsgroup is
microsoft.public.windowsxp.general.

http://groups.google.com/advanced_search?hl=en
 
P

Pegasus \(MVP\)

I read your post three times and I cannot work out what
you mean. Please give us an example instead of numerous
convoluted sentences that appear to have no beginning
and no end. Try to reply within a day so that we don't
have to rethink the problem each time, and continue in
the same thread as per Rock's recommendation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top