Command line - Some questions

Page 3 of 3 FirstFirst 123

  1. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #21

    Hello all,

    I have not read the entire thread yet (only noticed a non-existent check mark beside the thread title), but, Yaron, did you find an answer to some or all of some of your questions?
      My Computer


  2. Posts : 122
    Windows 7 Ultimate x32
    Thread Starter
       #22

    Hello Pyprohly,

    I use the following code:
    Code:
    for %%a in (.) do set CurrentFolder=%%~nxa
    "C:\Program Files\WinRar\WinRar" a -afzip -r "%CurrentFolder%.ja"
    Please let me know if you can think of a better way.
    Thanks.
      My Computer


  3. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #23

    Think of a better way to do what?

    For the sake of clarity on my behalf and to make sure we're on the same page, could I get you, Yaron, to rephrase (all of) your intentions and any questions you have that you are in need of an answer to -- as if beginning the whole thread anew. I'll see if I can make improvements for you from there.

    Apologies in advance but It really helps if I'm not so confused as to what needs to be done. Besides, this thread is well past its expiry date.
      My Computer


  4. Posts : 122
    Windows 7 Ultimate x32
    Thread Starter
       #24

    Thank you for your kind willingness to help. I appreciate it.

    I've posted the following question here.

    I use WinRar.

    In Options > Settings > Integration > User defined archive extensions, I've associated XPI and JA files with the program.


    I would like to add the following entries to Windows Explorer's context menu:

    1) Add to archive "FileName.xpi"
    2) Add to archive "FileName.ja"


    I'd like the entries to appear below the default "Add to archive 'FileName.zip'", and also the compression format to be in my zip settings.


    *

    If you know of another Archiver with which I could achieve that, please let me know.


    (Win 7, 32 bit).

    Thank you.

    ***

    Later, I've posted the following question here.

    I've created a batch file for zipping selected items in a folder.
    (The file is placed in 'Send to').


    If I use the following code:
    for %%* in (.) do set CurrentFolder=%%~n* "C:\Program Files\WinRar\WinRar" a -afzip "%CurrentFolder%.xpi"

    • The file name is that of the current folder (correct).
    • All files are archived whether I select one file or multiple files (wrong).
    • Selected folders are not archived (wrong).

    If I use the following code:
    set file=%~f1 "C:\Program Files\WinRar\WinRar" a -afzip "%file:~0,-4%.xpi" %1

    • The file name is that of the file on which I right click (correct).
    • Only that file is archived even if multiple files are selected (wrong).



    How can I know if a single item is selected or more?
    What's the condition syntax?
    How can I include folders in the archive?


    Thank you.

    ***

    Could you please read the threads?

    Best regards.
      My Computer


  5. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #25

    Whether or not they pose valid information, feeding me these dated posts of yours does not make things any clearer. I could be giving answers to questions that have already been answered to: bloating the forum with irrelevant information, unneeded advice and extensive amounts of superfluous typing on both of our behalves.

    It's better if you append here new information that is more relevant to the present. And I ask of you to be very precise with what you want answered.


    You intend to create a batch file, true? What is this script to do? What have you tried and what problems have you come across? What's your script look like now?

    Have the three questions in the OP been answered already?
      My Computer


 
Page 3 of 3 FirstFirst 123

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:54.
Find Us