Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: [Solved] What command do I need?  (Read 4050 times)

0 Members and 1 Guest are viewing this topic.

Inferi0r

  • Guest
[Solved] What command do I need?
« on: July 19, 2007, 06:52:22 AM »
Ok I have a .cmd with this command:

Quote
%PROGRAMFILES%\\Mozilla Firefox\\extensions\\*xpi

This command have to run a few .xpi's files that are located in a text file (i've used the DIR folder /B > myfile.txt to get the filenames).

The myfile.txt looks like this:
Quote
adblock_plus-0.7.5.1-fx+tb+sm+fl.xpi
downthemall!-0.9.9.10-fx+tb+fl.xpi
fasterfox-2.0.0-fx.xpi
videodownloader-1.1.1-fx.xpi

How get I this filenames in the command above? So that the computer will run the executables one by one.

Please say if it is impossible of you don't understand me

Edit: Got the solution:
Quote
FOR /F %%i IN ('DIR /B /A-D "%ProgramFiles%\Mozilla Firefox\extensions\*.xpi"') DO "%ProgramFiles%\Mozilla Firefox\firefox.exe" -install-global-extension "%ProgramFiles%\Mozilla Firefox\extensions\%%i"
« Last Edit: July 21, 2007, 02:36:33 PM by Inferi0r »