| Author |
Message |
R-S-H
Joined: 18 Feb 2013 Posts: 262
|
Posted: Wed 08 May 2013, 22:25 Post subject:
How to select files inside a ROX window by a bash script? |
|
Hi,
I want to select different files (sorted in a predefined list) shown in a previous opened ROX filer window from within a bash script.
Is this possible, and how?
Thanks,
RSH
_________________ Freiheit für Mollath - JETZT !!!
Free Mr. Mollath !!!
Send the People responsible to The Hague International Court for trial !!!
|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 832
|
Posted: Thu 09 May 2013, 11:12 Post subject:
|
|
R-S-H,
I haven't tried this but perhaps something could be done with the SOAP feature of rox.
http://rox.sourceforge.net/Manual/Manual/Manual.html#soap
Maybe this part - "Copy(From, To, [Leafname, Quiet]) Copy each file in the array From to the directory To........"
Regards,
s
|
|
Back to top
|
|
 |
R-S-H
Joined: 18 Feb 2013 Posts: 262
|
Posted: Thu 09 May 2013, 17:59 Post subject:
|
|
Hi seaside.
Yeah, I've found already an example for this in a script of your SFS-Exec (the script that opens ROX filer showing only the SFS files in SFS directory)
Option 'Filter' or ?'Filters'? unfortunately seems not to be able to filter a list of files (except *.sfs etc. - but that would show all of the .sfs files).
I thought about to filter about 35 files from a directory that contains about 800 files. Would have been nice to get a ROX filer window opened with an preselected selection of different files.
However, thanks for your reply to this.
RSH
_________________ Freiheit für Mollath - JETZT !!!
Free Mr. Mollath !!!
Send the People responsible to The Hague International Court for trial !!!
|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 832
|
Posted: Thu 09 May 2013, 20:02 Post subject:
|
|
R-S-H,
I'm not exactly sure what you have in mind. A group of user-selected files or preselected? At any rate, one more idea-
Perhaps you could us bash/find to select and copy files to NEWDIR directory and then open it "rox -d NEWDIR".
Regards,
s
|
|
Back to top
|
|
 |
Rattlehead

Joined: 11 Sep 2008 Posts: 188 Location: Madrid, Spain
|
Posted: Thu 09 May 2013, 20:20 Post subject:
|
|
Not the neatest way to do it, but you could also 'robotize' the whole process with Xdotool, making a loop that goes
pick first item on the list
keypress / in Rox
type the file name
keypress / again
keypress space
(end of loop)
The whole selection process will then happen 'in your face', which can be regarded as lame or sci-fi-like, depending on the situation I guess
Also, it depends on the number files you usually want to select. The typing is not instant, so if the amount is big...
Just an idea
|
|
Back to top
|
|
 |
amigo
Joined: 02 Apr 2007 Posts: 1757
|
Posted: Fri 10 May 2013, 12:45 Post subject:
|
|
Don't mix cli and gui together -what you propose is a bad idea. Just use nice shell to do what you want...
|
|
Back to top
|
|
 |
sunburnt

Joined: 08 Jun 2005 Posts: 4001 Location: Arizona, U.S.A.
|
Posted: Fri 10 May 2013, 14:46 Post subject:
|
|
Trying to get info. from GUI`s that aren`t designed for it is pointless.
Geany, rxvt, GtkDialog, etc. With rxvt you can redirect some output to a file.
You can`t scrape Geany`s edit box for text, you can only read it`s files.
But if Geany`s file is not saved... Then the file`s not up to date.
|
|
Back to top
|
|
 |
nilsonmorales

Joined: 15 Apr 2011 Posts: 277 Location: El salvador
|
Posted: Fri 10 May 2013, 18:00 Post subject:
|
|
http://hatteras.wordpress.com/2010/02/02/copiar-o-mover-un-archivo-a-cualquier-directorio-con-un-script/ maybe give a clue
|
|
Back to top
|
|
 |
tallboy

Joined: 21 Sep 2010 Posts: 343 Location: Oslo, Norway
|
Posted: Sat 11 May 2013, 14:13 Post subject:
|
|
| R-S-H wrote: | | ...shown in a previous opened ROX filer window |
Hmm. I am not sure if I interpret your wish correctly, but I think this can be done with an ordinary redirection command in Linux.
If you open /root/my-documents/ , and then make a text-file and save it to my-documents, it will be visible at once in the open window.
In a script, you can redirect the files you find with 'grep', 'find' or whatever technique you use, with: | Code: | | find files | mv /root/my-documents |
Test it with this command in a terminal: | Code: | | touch 1.txt 2.txt 3.txt | mv my-documents |
The mv -t or --target-directory option can be used: | Code: | | touch 1.txt 2.txt 3.txt | mv --target-directory=my-documents |
See mv --help for options.
Sorry if I misunderstand completely, then we just try again!
THIS IS NOT WORKING WITH THE CODE SUPPLIED; REGARD IT AS INSPIRATION ONLY!
tallboy
_________________ True freedom is a live Puppy on a multisession CD/DVD.
|
|
Back to top
|
|
 |
musher0

Joined: 04 Jan 2009 Posts: 2194 Location: Gatineau (Qc), Canada
|
Posted: Sat 11 May 2013, 15:01 Post subject:
Re: How to select files inside a ROX window by a bash script? |
|
| R-S-H wrote: | Hi,
I want to select different files (sorted in a predefined list) shown in a previous opened ROX filer window from within a bash script.
Is this possible, and how?
Thanks,
RSH |
Hi, R-S-H.
Maybe you will find some leads in the ROX manual, chapters 10 and 14, and also Annex C. Those parts of the ROX manual focus on searching and displaying, and how to script ROX directly (Annex C).
Your project is a little vague in my mind, but a "previous opened ROX filer window" is a directory, no? Same as
ls <directory>.
So maybe you can forget ROX and do it with ls ?
(Depending on what you want to do, fo course)
Something like
ls [directory]/[flag_for_search] > list.lst
then do something with the list with the
for...do command ? (copy, display or link, etc.)
The full less utility can be handy because it has the ![command] function from the display.
Just my 2 cents. Good luck!
musher0
_________________
"...l'industrie de l'informatique n'aura besoin que de très peu de temps pour ramener l'humanité aux dessins rupestres." (M. Goebbel, Order of the Command Line; [ma trad.])
|
|
Back to top
|
|
 |
R-S-H
Joined: 18 Feb 2013 Posts: 262
|
Posted: Sat 11 May 2013, 22:24 Post subject:
|
|
Hi.
Thanks for all the replies.
Since a picture is telling more than a 1000 words - this how the ROX filer window should look like, when opened by a script (as an example).
The files are listed in a text file. I just need to either deselect a few files manually or to add a few files to this selection manually.
I've already thought about any use of xdotool for this, but can't see any solution how to tell xdotool to select a specific file in a ROX filer window.
RSH
| Description |
|
| Filesize |
108.5 KB |
| Viewed |
46 Time(s) |

|
_________________ Freiheit für Mollath - JETZT !!!
Free Mr. Mollath !!!
Send the People responsible to The Hague International Court for trial !!!
|
|
Back to top
|
|
 |
tallboy

Joined: 21 Sep 2010 Posts: 343 Location: Oslo, Norway
|
Posted: Sat 11 May 2013, 22:39 Post subject:
|
|
BTW, the Linux commands available in puppy, are not the full versions, but limited versions from Busybox. It is possible that a perfectly valid Linux command string will not give the intended results, when used in puppy.
For a full set, you must download and install 'coreutils', but be prepared for some strange results if the old commands are not completely removed. Busybox (or maybe X) may crash.
Take a look at this link for some versions of code:
http://www.cyberciti.biz/tips/howto-linux-unix-find-move-all-mp3-file.html
tallboy
_________________ True freedom is a live Puppy on a multisession CD/DVD.
|
|
Back to top
|
|
 |
|