Thank you Paul, this works great. Sorry for delaying my thanks but I've been away from a computer for the past week. I appreciate all your help.
--- In [email protected], "Gardner, Paul G." <[EMAIL PROTECTED]> wrote: > >Thanks for your help. I'm not quite there yet but I'm a bit closer. > >Your script as written didn't work; I kept getting an error saying it > >couldn't find > >?"C:\Program Files\WinRAR\WinRAR.exe a -r D:\work\"++DirValue > > >I tried changing all the quotes around and the closest I could get was > >this: > >"C:/Program Files/WinRAR/WinRAR.exe" a -r "D:/work/"++DirValue > >It didn't like the back slashs, even with the "?" before both > >directories. The problem is that it always compresses my Winrar > >directory instead of the one I am right clicking on. Secondly, the > >name of the archive comes out to "++DirValue.rar" > > Ok, I downloaded WinRar and this time, tested it. Should have done that the > first time. > > Replace the last line of the script with the following (this is all one > line): > do(?"C:\Program Files\WinRAR\WinRAR.exe",?' a - r "C:\work\'++DirValue++?'" > "'++arg(1)++?'\*.*"') > > Couple of things I noticed: > 1) The entire path is stored in the .rar archive, which I assume you want. > 2) In your original example, you weren't providing the source path to be > archived, so WinRar got the current directory, which was it own. > > This assumes that you're right-clicking on the desired folder, not > right-clicking on a folder inside the folder you want archived. If that's > the case, the changed line will need to be changed again. I didn't do that > because I'm not sure exactly what you're doing and didn't want to do the > extra work unnecessarily. > > But it works now, at least on my machine, for the parameters you provided. > > The entire script is below > ;-------begin script-------- > local DirValue > > For (DirValue = arg(1); index(DirValue, ?"\") > 0; ) > DirValue = remove(DirValue,index(DirValue, ?"\")) > Endfor > > do(?"C:\Program Files\WinRAR\WinRAR.exe",?' a - r "C:\work\'++DirValue++?'" > "'++arg(1)++?'\*.*"') > ;-------end script-------- > > Paul Attention: PowerPro's Web site has moved: http://www.ppro.org Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/power-pro/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
