Go Back   FlashFXP Forums > >

Project: FlashFXP Feature Requests Ticket Tools
ID: 765 Category: Functionality
Title: Add items to a running queue from CLI Status: Closed
Severity: Minor Version: 4.x

Junior Member
SamKook
08-31-2012, 09:28 PM
Add items to a running queue from CLI

I would like to have a CLI switch(either a dedicated option that would specify to add a queue file to an(y) open instance of FlashFXP or by specifying the process id for it to be loaded in) that would permit to add new items to a queue that is currently uploading in an instance of FlashFXP.

Or having the option to set FlashFXP to only open one instance and that loading a new queue file would add it to the already loaded one without having to specify anything special in the switches.

Or some other way I didn't think of, I'm not picky, as long as I can add more items automatically.
FlashFXP Developer
bigstar
06-16-2014, 10:54 AM
Re: Add items to a running queue from CLI

I came up with an idea that sounds quite solid and I think it might be a viable solution.

You start your main FlashFXP instance with an additional command line switch /id="<name>" where <name> is a short and simple text used to identify this instance of FlashFXP later.

Such as:
Code:
FlashFXP.exe /id="demo" <plus any additional command line switches>
Now to append a queue file to any running FlashFXP process identified with an id = demo
Code:
FlashFXP.exe /withid="demo" /queue="my.fqf"
This will launch flashfxp.exe and instruct any FlashFXP process with an id of demo and instruct it to load the queue file.

If you start multiple instances using the same /id then each of these instances will append the same queue file.

What do you think, do you have any suggestions, or concerns?
Junior Member
SamKook
06-17-2014, 11:56 AM
Re: Add items to a running queue from CLI

That sounds like a good way to handle it, especially since I have a better internet connection and I now have multiple instances opened at once.

One thing though, does it have to be a different switch to add a queue?

The goal is to be able to add files to the queue of a running instance in case a transfer I previously launched isn't finished yet and I have no way to know if that's the case or not.

Since I would need a new instance if the previous one got closed, simply launching it with the full parameters, checking if there's already an instance with the same id and queing the queue file if it exist or starting a new instance if it doesn't would be best.

So you'd run, for example:
Code:
FLASHFXP.EXE -id="demo" -c2 -get "some_path\auto_created_queue_file.fqf"
and then you'd run before the previous one is done uploading:
Code:
FLASHFXP.EXE -id="demo" -c2 -get "some_other_path\auto_created_queue_file.fqf"
and it would check if there's a FlashFXP instance already open with the "demo" id, add the files from "some_other_path\auto_created_queue_file.fqf" to the already running "demo" flashFXP instance and either update the running instance using the other switches(if I had specified something different) or not, depending on what you think is best(I'm fine with either).
And if there's no running instance, it would simply start a new one after checking using the parameters specified in the second command.

If it has to be a different switch like your example, we'd also need a way to check if an instance with a specific id is already running and have some kind of feedback to know the answer.
Edit: Or we could simply get an error return code that would let us know there isn't one running now that I think about it since it would check when launched anyway.
FlashFXP Developer
bigstar
06-17-2014, 12:57 PM
Re: Add items to a running queue from CLI

What do you think about this, it would allow you to use the same switches for each run.

First run..
Code:
FLASHFXP.EXE -id="demo" -single -c2 -queue="path\file_1.fqf" -get
Launch FlashFXP.exe
Set the ID to demo.
Set the ID to be a single instance and check for any existing instances with the same ID, if a previous instance is found then the path\file defined by -queue is passed to existing instance and the new instance closes.
Set the on transfer complete to close flashfxp.
Load the specified queue file.
Automatically start transferring the queue.

Second run..
Code:
FLASHFXP.EXE -id="demo" -single -c2 -queue="path\file_2.fqf" -get
This time around the only thing different is our queue file.
Lets assume that the first run is still running so the single instance check will send the queue to the first instance and then close.

The only information being passed between the two instances is the queue file name, all other command line switches are ignored.
Junior Member
SamKook
06-17-2014, 02:38 PM
Re: Add items to a running queue from CLI

That works for me.

With that behavior, if you specify the same id twice without the -single switch and then a third time with the -single switch, will the queue be added to both of the running instances or just the first one it finds?
Not a very likely scenario, but it could happen(not in my case though).

I don't think it would, but just to be sure, will it cause problems if the queue has the exact same file name, but is in a different path?
FlashFXP Developer
bigstar
06-17-2014, 04:08 PM
Re: Add items to a running queue from CLI

Great

Quote:
With that behavior, if you specify the same id twice without the -single switch and then a third time with the -single switch, will the queue be added to both of the running instances or just the first one it finds?
It would be added to all running instances with the same id.

Quote:
I don't think it would, but just to be sure, will it cause problems if the queue has the exact same file name, but is in a different path?
It doesn't matter, it could even be the same queue file.
Junior Member
SamKook
06-17-2014, 04:11 PM
Re: Add items to a running queue from CLI

Good, thanks.

Can't wait for this to get implemented, it will save me a lot of trouble trying to implement a workaround in my scripts.
FlashFXP Developer
bigstar
06-22-2014, 09:21 PM
Re: Add items to a running queue from CLI

This has been added to the latest v5.0 release.
Ticket Tools
Subscribe to this Ticket


Posting Rules
You may not post new tickets

Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -5. The time now is 05:42 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)