.bat / Dos Script Issues.

K

Kardon Coupé

Dear All,

I'm having a bit of a problem with a .bat script and I can't find a
newsgroup specific to this and was wondering if anybody can help....

I've got a regular issue of having to right click on a custom file and
rar'ing it up, then copying the file to a location (which doesn't change) on
a networked drive...

I tried to make a .bat script that says...

"C:\Program Files\WinRAR\rar.exe" %1.rar a -ad %1 >output.txt {output.txt
was just to see if there are any errors)
xcopy [newfilecreated] [networkdrivelocation] /Y

Then, setup a 'Right Click' option for the context menu that says, 'Rar 'n'
Copy' then I right click on the file, choose it and it does it all for
me.....

and I know a lot of people will be saying... "you need a Win/Rar forum" but
the issue I've got is I can't pull the filename I'm right clicking (Setup
from Explorer/Tools/Folder Options/ File Types/{Extension}/Advanced) on into
the .bat script, so I'm thinking it is a windows issue first? basically I'd
like to pass the filename to Rar.exe and then get rar.exe to do it's stuff,
then the batch script will continue and copy the file over..

Hope someone understands what I'm trying to say and it able to help me...

Regards
Paul.
 
P

Pegasus \(MVP\)

Kardon Coupé said:
Dear All,

I'm having a bit of a problem with a .bat script and I can't find a
newsgroup specific to this and was wondering if anybody can help....

I've got a regular issue of having to right click on a custom file and
rar'ing it up, then copying the file to a location (which doesn't change)
on a networked drive...

I tried to make a .bat script that says...

"C:\Program Files\WinRAR\rar.exe" %1.rar a -ad %1 >output.txt {output.txt
was just to see if there are any errors)
xcopy [newfilecreated] [networkdrivelocation] /Y

Then, setup a 'Right Click' option for the context menu that says, 'Rar
'n' Copy' then I right click on the file, choose it and it does it all for
me.....

and I know a lot of people will be saying... "you need a Win/Rar forum"
but the issue I've got is I can't pull the filename I'm right clicking
(Setup from Explorer/Tools/Folder Options/ File
Types/{Extension}/Advanced) on into the .bat script, so I'm thinking it is
a windows issue first? basically I'd like to pass the filename to Rar.exe
and then get rar.exe to do it's stuff, then the batch script will continue
and copy the file over..

Hope someone understands what I'm trying to say and it able to help me...

Regards
Paul.

The technique shown in the following link can easily be tweaked to do your
job: http://support.microsoft.com/?kbid=321379 (Print directory listing).
 
K

Kardon Coupé

Thanks, the direction of that helped me alot..

Regards
Paul.
Pegasus (MVP) said:
Kardon Coupé said:
Dear All,

I'm having a bit of a problem with a .bat script and I can't find a
newsgroup specific to this and was wondering if anybody can help....

I've got a regular issue of having to right click on a custom file and
rar'ing it up, then copying the file to a location (which doesn't change)
on a networked drive...

I tried to make a .bat script that says...

"C:\Program Files\WinRAR\rar.exe" %1.rar a -ad %1 >output.txt
{output.txt was just to see if there are any errors)
xcopy [newfilecreated] [networkdrivelocation] /Y

Then, setup a 'Right Click' option for the context menu that says, 'Rar
'n' Copy' then I right click on the file, choose it and it does it all
for me.....

and I know a lot of people will be saying... "you need a Win/Rar forum"
but the issue I've got is I can't pull the filename I'm right clicking
(Setup from Explorer/Tools/Folder Options/ File
Types/{Extension}/Advanced) on into the .bat script, so I'm thinking it
is a windows issue first? basically I'd like to pass the filename to
Rar.exe and then get rar.exe to do it's stuff, then the batch script will
continue and copy the file over..

Hope someone understands what I'm trying to say and it able to help me...

Regards
Paul.

The technique shown in the following link can easily be tweaked to do your
job: http://support.microsoft.com/?kbid=321379 (Print directory listing).
 
T

Twayne

Dear All,
I'm having a bit of a problem with a .bat script and I can't find a
newsgroup specific to this and was wondering if anybody can help....

I've got a regular issue of having to right click on a custom file and
rar'ing it up, then copying the file to a location (which doesn't
change) on a networked drive...

I tried to make a .bat script that says...

"C:\Program Files\WinRAR\rar.exe" %1.rar a -ad %1 >output.txt
{output.txt was just to see if there are any errors)
xcopy [newfilecreated] [networkdrivelocation] /Y

Then, setup a 'Right Click' option for the context menu that says,
'Rar 'n' Copy' then I right click on the file, choose it and it does
it all for me.....

and I know a lot of people will be saying... "you need a Win/Rar
forum" but the issue I've got is I can't pull the filename I'm right
clicking (Setup from Explorer/Tools/Folder Options/ File
Types/{Extension}/Advanced) on into the .bat script, so I'm thinking
it is a windows issue first? basically I'd like to pass the filename
to Rar.exe and then get rar.exe to do it's stuff, then the batch
script will continue and copy the file over..
Hope someone understands what I'm trying to say and it able to help
me...
Regards
Paul.

alt.msdos.batch.nt guys are great with XP batches. If your ISP tossed
out the alt.*, try an alternate place like news.aloe.org or one of many
others.

HTH
 

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