Guest Kardon Coupé Posted July 25, 2008 Posted July 25, 2008 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.
Guest Pegasus \(MVP\) Posted July 25, 2008 Posted July 25, 2008 Re: .bat / Dos Script Issues. "Kardon Coupé" <prefer.to@readon.newsgroups> wrote in message news:uzss28m7IHA.4468@TK2MSFTNGP02.phx.gbl... > 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).
Guest Kardon Coupé Posted July 25, 2008 Posted July 25, 2008 Re: .bat / Dos Script Issues. Thanks, the direction of that helped me alot.. Regards Paul. "Pegasus (MVP)" <I.can@fly.com.oz> wrote in message news:O$dVbwn7IHA.1428@TK2MSFTNGP06.phx.gbl... > > "Kardon Coupé" <prefer.to@readon.newsgroups> wrote in message > news:uzss28m7IHA.4468@TK2MSFTNGP02.phx.gbl... >> 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). >
Guest Twayne Posted July 25, 2008 Posted July 25, 2008 Re: .bat / Dos Script Issues. > 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
Recommended Posts