1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help With WinRAR

Discussion in 'Windows - Software discussion' started by MagicJon, Apr 30, 2007.

  1. MagicJon

    MagicJon Member

    Joined:
    Apr 30, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    Hi people, I could do with abit of help with splitting files up using dosRAR.....here is the code below (then ill explain my problem)

    a -rr1%% -v15000 -m0 c:\Archive c:\*.ISO*

    The bit highlighted in black is my problem...does anyone know what i put in there so that winrar uses the filename of the file being split instead of all my split files being called Archive.....

    any help would be great as this is driving me f@@king nutz
     
  2. Indochine

    Indochine Regular member

    Joined:
    Dec 21, 2006
    Messages:
    1,447
    Likes Received:
    0
    Trophy Points:
    46

    Rar.exe syntax for creating archives is...

    rar <command> -<switch 1> -<switch N> <archive> <files...>

    Let's compare your command with the syntax and we'll see what's going on.

    Your command is a (add files)

    OK so far.

    Then you have your switches

    Switch 1 seems to be -rr1%% ie create 1% data recovery record (But why the 2 % signs?)

    Switch 2 is -v15000 *the volume size, 15000 * 1000 bytes)

    Switch 3 is -m0 (no compression, just store)

    Your archive name is set to be C:\Archive for some reason...

    Then comes the files to store, you have a wildcard, *.ISO*, which as it stands will include everything in the folder with a extension starting with .ISO. If you just want to catch the ISO files, leave out the last asterisk.

    The code you have posted will create an archive called c:\archive.rar, containing ALL the *.iso* files in the folder in which it is run.

    To answer your query...

    Let's say you have an iso called Oranges And Lemons.iso in a folder. You want to name the archive after the iso? So name the archive after the iso!

    rar a -rr1% -v15000 -m0 "Oranges And Lemons.rar" "Oranges And Lemons.iso"

    I hope I made that clear enough.
     
  3. MagicJon

    MagicJon Member

    Joined:
    Apr 30, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    a -rr1%% -v15000 -m0 c:\Archive c:\*.ISO*

    Marked in black is correct...Ill explain abit more...if it was as simple as you put it i would have been able to do that ..my problem is abit harder to solve...

    The above line of text is to be injected into another program so the %% is to make that bit work..if i use only a single % it doesnt work....now to my problem..because the above line is being injected into another program what you put "Oranges And Lemons.rar" would mean ever iso i split would be named that and id have n way of changing it....that is why i was asking for a bit of code that automaticaly took the name of what ever iso i was plsitting as the archive name...you get what i mean
     
  4. Indochine

    Indochine Regular member

    Joined:
    Dec 21, 2006
    Messages:
    1,447
    Likes Received:
    0
    Trophy Points:
    46
    The Rar.exe program requires the archive name. You cannot just put a wildcard in there. In a batch program, you could do this...

    REM for each file satisfying *.iso in the current folder

    for /F "delims==" %%a in ('dir /b *.iso') do (

    REM extract filename from filename.extension
    REM with ~n
    REM type FOR /? at cmd prompt to see info
    REM if %%a expands to cherrypie.iso
    REM %%~na expands to cherrypie

    rar a -m0 "%%~na.rar" "%%a"

    )

    If I knew more about this other program I could provide more focussed help...




     
  5. MagicJon

    MagicJon Member

    Joined:
    Apr 30, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    The other program is called (AutoPlay Media Studio V6) & because this doesnt allow the use of the dll.s i can only use 1 line of text..I havent seen away round this yet...
     
  6. MagicJon

    MagicJon Member

    Joined:
    Apr 30, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    Just tried your code & nothing happens....
     
  7. Indochine

    Indochine Regular member

    Joined:
    Dec 21, 2006
    Messages:
    1,447
    Likes Received:
    0
    Trophy Points:
    46
    Which code? What are you talking about?
     
  8. Indochine

    Indochine Regular member

    Joined:
    Dec 21, 2006
    Messages:
    1,447
    Likes Received:
    0
    Trophy Points:
    46
    write a batch file.
     
  9. MagicJon

    MagicJon Member

    Joined:
    Apr 30, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    I have no idea how to write a batch file for this...If i could write a batch file id write one that let you choose compression & size to split the files....but the code i have already i only just understand..
     
  10. Indochine

    Indochine Regular member

    Joined:
    Dec 21, 2006
    Messages:
    1,447
    Likes Received:
    0
    Trophy Points:
    46
    You wrote that you tried my code and it "didn't work". I don't understand how you did that, if you can only "inject" one line, when I wrote an 8 line batch file.

    However, what I am suggesting is that if you can only inject one line, then that line should be the name of a batch file which can contain as many lines as you like. I could try to write that batch file.

    Just out of interest, where did you get that line of code you posted before? This one..

    a -rr1%% -v15000 -m0 c:\Archive c:\*.ISO*
     
  11. MagicJon

    MagicJon Member

    Joined:
    Apr 30, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    It took me 3 days of looking on web sites like this one...as im not very good with winRAR & there isnt alot of info on the commands & what they do....sorry for being like no help at all lol.....the program im using is quite good i could configure it so it called a batch file rather than 1 line of text..although ive not tried it im sure i can get it to do that if i had the batch file...for testing
     
  12. Indochine

    Indochine Regular member

    Joined:
    Dec 21, 2006
    Messages:
    1,447
    Likes Received:
    0
    Trophy Points:
    46
    You can get a lot of info on command-line RAR by opening a command window in the folder where rar.exe is located and typing rar /?.

    It looks like you want to make a split RAR archive which contains an ISO. is that right?



     
  13. MagicJon

    MagicJon Member

    Joined:
    Apr 30, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    What i would love is for me to be able to drop any iso into the c drive then just start up my prog and choose via the buttons which size the archives are yes......its just i dont want them all called archive.part001 & so on.....i would like it if when i click the button on my prog that it takes the name of the iso and uses that....as having every iso image i split called archive isnt really somethig i want
     
  14. Indochine

    Indochine Regular member

    Joined:
    Dec 21, 2006
    Messages:
    1,447
    Likes Received:
    0
    Trophy Points:
    46
    Pardon me for maybe asking the obvious, but if you have the DOS Rar program, surely you also have WinRAR? Why don't you just use that? Is it because you like doing things the hard way? (Nothing wrong with that!)

    You seem to be trying to make a command-line app work in a drag-and-drop way...
     
    Last edited: May 4, 2007
  15. MagicJon

    MagicJon Member

    Joined:
    Apr 30, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    Yes i can just use winrar like everyone else...but ive made a little app that lets you pick and choose file size and lets just say for arguements sake that id never used winrar before....setting up an archive properly isnt that easy my app has 3 buttons and each button hasthe same line but with a diffrent file size for splittng...hense i need this bit of code to work....as once the line is in the app it cant be changed...that would mean every iso i did would all be called the same thing
     
  16. Indochine

    Indochine Regular member

    Joined:
    Dec 21, 2006
    Messages:
    1,447
    Likes Received:
    0
    Trophy Points:
    46
    It sounds to me a bit like trying to shave with a carpenter's chisel. Maybe if the chisel is sharp enough, and you hold it just right...

    I don't agree that WinRAR is hard to use...
     
  17. MagicJon

    MagicJon Member

    Joined:
    Apr 30, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    ok but i still need the bit of code working requardless
     
  18. Indochine

    Indochine Regular member

    Joined:
    Dec 21, 2006
    Messages:
    1,447
    Likes Received:
    0
    Trophy Points:
    46
    Well, it sounds like you have ambitions to be a code wizard. I would hate to spoil the joy of learning to code for you, so I wish you good luck and lots of fun.
     
  19. MagicJon

    MagicJon Member

    Joined:
    Apr 30, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    If i had any ambitions of becoming a code wizard, as you put it, would i be in here asking for help on this.

    The only lanuage i can program in (& i use that term loosly) is LUA..this comes with the program im using AMS 6
     

Share This Page