Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Command line - Some questions

31 Dec 2014   #21

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan

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 System SpecsSystem Spec
01 Jan 2015   #22

Windows 7 Ultimate x32

Hello Pyprohly,

I use the following 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.
My System SpecsSystem Spec
01 Jan 2015   #23

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan

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 System SpecsSystem Spec

01 Jan 2015   #24

Windows 7 Ultimate x32

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 ''", 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 System SpecsSystem Spec
01 Jan 2015   #25

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan

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 System SpecsSystem Spec

 Command line - Some questions

Thread Tools

Similar help and support threads
Thread Forum
Executing command line command anywhere ?
I want to create a setup whereas a command line command can be run from any directory/folder, without having to be in the directory/folder whereas the command line command resides ?
General Discussion
Command Line - Help
Hi Guy's and Girls, Just first off I've never been too good with CMD and only an Apprentice in my company I work for. Now something I've wanted to do for awhile was to make the following but I don't necassirealy I know how to do this in one batch file: I would need a Batch file that is...
General Discussion
Command line csc not working.
I am trying to use csc.exe from the command prompt to run a program called c:\code\helloworld.cs. I know the program works as I tested it using 'compile online dot com'. When I run csc, I get the following error (see jpg). How may I solve this problem, please? When I set the 'Path' to the...
General Discussion
Command Line
Is there a cmd.exe /switch for “run as administrator” ? Thanks-
General Discussion
Can you boot from the command line?
This is an off topic thread because it concerns WinXP/2000 dual boot machine which are not booting. I can get to the Windows\ and Winnt command line of each but trying to figure out if I can boot from there. If I try to boot regularly I get "missing operating system" Im trying the Windows 2000...
Chillout Room

Our Sites

Site Links

About Us

Find 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 05:12.
Twitter Facebook Google+