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

You shouldn't use batch because you can run whatever you want from VBScript. The only processing of files should be done by the first instance of the script. Any new copies of the script should just hand the file or folder path to the first copy. Once you have that perfected then you can put any commands in.

In fact I would be surprised if WinRar didn't have an option for a file with the list of files to add to the archive. The first copy of the script builds this list. When no more programs come up handing it more filenames, it runs WinRar.

If you post what you are looking for on a VBS forum someone may take you the rest of the way. I do a VBS script about one every 3 months and only a few lines. It's not my strong suit.

Yeah, Explorer firing off a program copy for each file makes it funky. Another approach you could do is Shift Right click and do Copy As Path and paste the filenames all at once to a text file. The result looks like this:

Yet another approach would be to use my hotkey utility Selector. For it to work you would make a shortcut for WinRar with the command line. You must leave the command line so that the files to be added to the archive can be tacked on at the end. You hit the hotkey to Selector and drag the WinRar shortcut and drop it on the List. Now that shortcut will remain in the list until removed.

The way it would work is, you select a bunch of files in Explorer and hit the Selector hotkey. Click on the WinRar shortcut in the list, and hit the Go Button. Selector adds all the filenames it copied to the clipboard, to the shortcut Target line and launches the shortcut.

See the Readme.txt file and also you can press F1 while Selector is the active window, to get help.

You too. If you get everything settled how you would process the files I may be able to throw together a short program. From inside scripting it's much easier to do things like split off the main filename with no path or extension and add the desired extension. That type of thing is tougher with only batch. A batch expert may have no trouble but I use batch for the easy stuff. I'm no expert.

If I know the exact program usage with params for a particular case I may be able to generalize it using AutoHotkey or a similar scripting language. Whichever way ends up easier.

Let’s assume we have the following structure:
A folder called TestMain.
TestMain contains 2 files: A, B.
And also a folder called TestSub.

The default “Compress to” works as follows:
If you only select file A (and right-click), you get “Compress to A.zip”.
If you only select folder TestSub (and right-click), you get “Compress to TestSub.zip”.
If you select more than one item, you get “Compress to TestMain.zip” and the selected items are compressed into a single file.

Trying to emulate this behavior with "Compress to XPI":
When using

Quote:

for %%a in (.) do set CurrentFolder=%%~nxa
"C:\Program Files\WinRar\WinRar" a -afzip -r "%CurrentFolder%.xpi"

WinRar compresses all items in ZIP format, and the file name is TestMain.xpi (the switch “-r”: include sub folders).
- That's good if you select all items.

Command line - Some questions

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 - HelpHi 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 LineIs 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...