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
Pyprohly

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
Yaron

Windows 7 Ultimate x32
 
 

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

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
Yaron

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

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
Reply

 Command line - Some questions




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
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
What is wrong with this command line?
Help please I am pulling my hair out. I use a desktop shortcut to run an application called get_iplayer.cmd located in the directory c:\program files\get_iplayer The line in the Target of the shortcut properties therefore reads: C:\Windows\System32\cmd.exe /k "c:\program...
General Discussion
UAC bug with runas from command line?
Hi Folks, I am experiencing what I believe is a bug with UAC in Windows 7. I would like to see if anyone can recreate this issue and tell me if it is a bug or is working as expected. To recreate the issue: 1. Confirm the following local security policy setting is Enabled. Local Policies...
General Discussion
Gpedit via command line
how can I enable disable a policy using gpedit! Not via the GUI, you go do some clicks and enable. But I want to execute one shot command which will say disable AutoRun. I have searched exenstively, no results. I kind need this for my automation stuff. Thanks, Akshay
Performance & Maintenance
libraries and the command line
I am a long time programmer and computer science professor, since 1979. I grew up with the command line and like it just fine. But Windows 7 seems to change the GUI way of doing things and not mess with the command line. Yesterday I was at the command prompt and went to C:\users\Stockwell and...
Performance & Maintenance
Command Line
Is there a cmd.exe /switch for “run as administrator” ? Thanks-
General Discussion


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 08:20.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App