Go Back   FlashFXP Forums > >

General Discussion Need help? Have a problem? Let us help you. Bug reports and feature requests should be made using the Bug Tracker or Feature Tracker

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 05-25-2015, 03:27 AM   #1
MPOWER
Junior Member
FlashFXP Registered User
 
Join Date: Nov 2007
Posts: 10
Default Call a saved queue in raw command

I am trying to build a set of custom commands. Is there any way to include the load of a saved queue?
One other thing. It the set of Raw commands how can I change directory and select other files from other directory on the same server as well?

example:

/lcd c:\myLocalfolder
/activate local
/select -f
/delete selected
/activate remote
/cd /data/indices/my_index/
/select -f *lst.csv
/cd/data/WORLD/my_remote_files/
/select -f *lst.csv
/queue selected


Thanks in advance
MPOWER is offline  
Old 05-25-2015, 03:39 AM   #2
MPOWER
Junior Member
FlashFXP Registered User
 
Join Date: Nov 2007
Posts: 10
Default

I fixed it like in the following example:

/lcd c:\myLocalfolder
/activate local
/select -f
/delete selected
/activate remote
/cd /data/indices/my_index/
/select -f *lst.csv
/queue selected
/cd/data/WORLD/my_remote_files/
/addselect -f *lst.csv
/queue selected
MPOWER is offline  
Old 05-25-2015, 09:07 AM   #3
DayCuts
Senior Member
FlashFXP Beta Tester
 
Join Date: Dec 2003
Posts: 421
Default

I would second the /loadqueue /savequeue suggestion, it would be useful to be able to manipulate a queue file using a custom command. I was just wondering about this the other day. I see I can use cli switches to automate queue manipulation but I have yet to test have efficiently it can be done as I have not had the time.

I am wondering if the -raw cli switch can launch a custom command such as -raw="/mycmd" so one could do for example...

flashfxp.exe "SITE1" -pass="" -lock -quit -queue="queuefile" -savequeue -raw="/updatequeuefile"

or with the potential load/save queue commands...

flashfxp.exe "SITE1" -pass="" -lock -quit -raw="/updatequeuefileX"

I know I am going OT here but I was also wondering if their were any plans to extend the -id cli switch, such as allowing -raw actions to be appended if the ID session is still active. For example if multiple external sources launch flashfxp via cli to perform simple raw commands they don't need to spawn new sessions if there is say a session with id "RAWCMS" already open...

flashfxp.exe -id="RAWCMDS" -pass="" -lock -quit -raw="somecmd"
flashfxp.exe -id="RAWCMDS" -pass="" -lock -quit -raw="somecmd2"
flashfxp.exe -id="RAWCMDS" -pass="" -lock -quit -raw="somecmdN"

If they are triggered to run at different times or events then currently you have to spawn and close sessions each time. You could write a queue file and use the -id -queue support but it is not necessarily efficient or desirable to be writing/deleting temporary files.
DayCuts is offline  
Old 05-27-2015, 08:41 AM   #4
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Quote:
Originally Posted by MPOWER View Post
I fixed it like in the following example:

/lcd c:\myLocalfolder
/activate local
/select -f
/delete selected
/activate remote
/cd /data/indices/my_index/
/select -f *lst.csv
/queue selected
/cd/data/WORLD/my_remote_files/
/addselect -f *lst.csv
/queue selected
Not sure if you made a mistake in your post or in your raw command script but the following line is not valid
/addselect -f *lst.csv

You'd want to use
/select -f *lst.csv
bigstar is offline  
Old 05-27-2015, 10:40 AM   #5
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Quote:
Originally Posted by DayCuts View Post
I would second the /loadqueue /savequeue suggestion, it would be useful to be able to manipulate a queue file using a custom command. I was just wondering about this the other day. I see I can use cli switches to automate queue manipulation but I have yet to test have efficiently it can be done as I have not had the time.
I will add the following commands to the next build.
/loadqueue <filename>
/savequeue <filename>

Quote:
Originally Posted by DayCuts View Post
I am wondering if the -raw cli switch can launch a custom command such as -raw="/mycmd" so one could do for example...

flashfxp.exe "SITE1" -pass="" -lock -quit -queue="queuefile" -savequeue -raw="/updatequeuefile"

or with the potential load/save queue commands...

flashfxp.exe "SITE1" -pass="" -lock -quit -raw="/updatequeuefileX"
This is a very interesting idea.

You would need to pass the predefined command to be performed as a command block "[updatequeuefileX]"

After performing some tests I discovered some limitations with the current design that would prevent this from working.

When you use the -raw switch it creates a queue entry to execute the command, this entry is added after the queue file is loaded, placing it at the end of the queue. (The switch order has no relevance)

I can change this behavior so that the raw command is always inserted into the top of the queue to execute first.

But now we have another problem, since the raw command is executed via the queue we need a way to stop it immediately after the last command is executed, if we use the /stop command to abort the queue then we introduce a new problem that prevents us from automatically closing flashfxp via the -quit switch. additional changes would be needed to make this work.

I will need to continue evaluating this idea to see if it can be done without making things overly complicated.

Quote:
Originally Posted by DayCuts View Post
I know I am going OT here but I was also wondering if their were any plans to extend the -id cli switch, such as allowing -raw actions to be appended if the ID session is still active. For example if multiple external sources launch flashfxp via cli to perform simple raw commands they don't need to spawn new sessions if there is say a session with id "RAWCMS" already open...

flashfxp.exe -id="RAWCMDS" -pass="" -lock -quit -raw="somecmd"
flashfxp.exe -id="RAWCMDS" -pass="" -lock -quit -raw="somecmd2"
flashfxp.exe -id="RAWCMDS" -pass="" -lock -quit -raw="somecmdN"

If they are triggered to run at different times or events then currently you have to spawn and close sessions each time. You could write a queue file and use the -id -queue support but it is not necessarily efficient or desirable to be writing/deleting temporary files.
Since a raw command passed via the CLI is transformed into a queue item which gets added to the queue anyways I think it might be more practical using a temporary queue file.

Also in my answer to your previous question I talked about changing -raw to insert the command at the top of the queue, that change would cause commands to be executed in the wrong order if something like this was allowed.

Oh and you would also need to pass the site name via the CLI which is missing from your example above
(I suspect a slight oversight on your post)
bigstar is offline  
Old 06-02-2015, 01:55 AM   #6
MPOWER
Junior Member
FlashFXP Registered User
 
Join Date: Nov 2007
Posts: 10
Default

Quote:
Originally Posted by bigstar View Post
Not sure if you made a mistake in your post or in your raw command script but the following line is not valid
/addselect -f *lst.csv

You'd want to use
/select -f *lst.csv
You are right, it was just a typo.
The command I used and worked was the
/andselect -f *lst.csv
MPOWER is offline  
Closed Thread

Tags
/select, f.csv, commands, /activate, selected, directory, set, raw, queue, saved, cmylocalfolder, local, server, /lcd, /cd, /queue, advance, /data/indices/my_index, /delete, remote, custom, build, command, include, load

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Forum Jump


All times are GMT -5. The time now is 02:38 PM.

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