Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 24 Nov 2014, 01:31
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Extra Rox attributes
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
sheepy


Joined: 06 May 2011
Posts: 235
Location: GA

PostPosted: Fri 12 Oct 2012, 16:57    Post subject:  Extra Rox attributes
Subject description: No-Clobber?
 

I really wish there were attributes on copying mass amounts of files in Rox other than just newer, recursive, and brief.
Why can't we have no-clobber? Meaning if the file is already there, do not ask to overwrite it and just skip it!

Does anyone know of a way we could add this to Rox?

Thank you.
Back to top
View user's profile Send private message Visit poster's website 
SFR


Joined: 26 Oct 2011
Posts: 1098

PostPosted: Fri 12 Oct 2012, 18:25    Post subject: Re: Extra Rox attributes
Subject description: No-Clobber?
 

sheepy wrote:
Meaning if the file is already there, do not ask to overwrite it and just skip it!


Hey Sheepy.

First of all I must admit I don't know C almost at all, but I was trying to achieve exactly the same thing a few days ago.

Here are my results, you might find them useful or as a start point.

1. I took ROX-Filer source code from here:
http://bkhome.org/sources/alphabetical/r/rox-filer-20111022-patched3.tar.gz
I believe it's the latest.

2. Did the following changes to action.c file:
Line 689: if (quiet && !ignore_quiet) >>> if (quiet && ignore_quiet)
Line 2042: abox = abox_new(_("Mount / Unmount"), quiet); >>> abox = abox_new(_("Mount / Unmount"), !quiet);
Line 2267: abox = abox_new(_("Copy"), quiet); >>> abox = abox_new(_("Copy"), !quiet);
Line 2307: abox = abox_new(_("Move"), quiet); >>> abox = abox_new(_("Move"), !quiet);

3. To compile ROX-filed I needed download shared-mime-info-0.90 (from Slacko 5.3.3 repo).
To compile I simply clicked the AppRun script.

4. I copied newly created ROX-Filer binary to /usr/local/apps/ROX-Filer dir and restarted X server.

It seems to work fine, but there's a couple of side effects (and probably more that I'm not aware of):

1. Now every copy/move operation requires confirmation (even if overwriting doesn't occur), but it's enough to click "Quiet" and all will go.
(actually, it's enough to not change 3 last lines from above to avoid this, but then again there won't be any confirmations at all).

2. During quiet copying there are error messages (see screenshot), but all files are overwritten properly, as far as I've checked...
I _guess_ it's more related to refreshing the GUI than real errors.

I didn't test it extensively; in fact I reverted the original ROX-Filer file, keeping in mind to learn that darn C at last and return to this someday.

But the best if someone more knowledgeable would like to involve, I'm not an expert at all...

EDIT:
BTW, you mean "skip it" as "allow to overwrite" or "skip it" as "not allow"?
I just noticed that I might misunderstood. Laughing
EDIT2: "No-clobber"
Oh yes, I see my mistake, sorry. Embarassed

Greetings!
roxmod.jpg
 Description   
 Filesize   47.01 KB
 Viewed   579 Time(s)

roxmod.jpg


_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
666philb


Joined: 07 Feb 2010
Posts: 1877
Location: wales

PostPosted: Fri 12 Oct 2012, 20:15    Post subject:  

my gripe is that the quiet option doesn't work when copying!
_________________
Tahrpup, built with trusty tahr packages http://murga-linux.com/puppy/viewtopic.php?t=96178
Quickpet_Precise, install popular apps quickly http://www.murga-linux.com/puppy/viewtopic.php?t=83642
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1098

PostPosted: Sat 13 Oct 2012, 08:12    Post subject:  

666philb wrote:
my gripe is that the quiet option doesn't work when copying!

Hey 666philb

Yes, this is exactly what bugs me in ROX-Filer, too.
And, by inadvertence, I was referring to this issue in my previous post, not Sheepy's.

Unfortunately, my "attempt" ("solution" is way too big word) makes that pressing "Quiet" copies and overwrites all files without confirmation, but doesn't work if one wish to not overwrite them without confirmation...

Late night is not a good time for me to post, anyway. Wink

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11157
Location: Arizona USA

PostPosted: Sat 13 Oct 2012, 22:39    Post subject:  

I hope I'm not hijacking this thread to ask if it might have anything at all to do with how ROX copies mp3 files from one flash drive to an mp3 player?

I'll try to be brief. If I just drag the directory containing the mp3 files (which are always numbered sequentially from, say, 1 to 200) into the mp3 player, ROX does not load the files in numerical order. The first few files might load correctly, but then ROX goes off into some weird mode and jumps way down the list. Eventually all the files get copied to the directory in my mp3 player, but every mp3 player I've tried (5 or 6 of them at least) plays the mp3 files in a directory in the order they were copied into the mp3 player, not in their numerical order. I need the files to play in numerical order.

I've found that if I first open in ROX the directory containing the mp3 files, "Select all" the mp3 files and click twice on the "Name" column heading, I can then drag the (still selected) files into the mp3 player and they will load in strict sequence from 1 to 200 (or however many there are.)

Is there something I can do to ROX that will allow me to simply drag a directory containing hundreds of mp3 files into my mp3 player, and ROX will copy the files in the directory in their numerical order?

If I'm hijacking this thread, let me know and I'll split this off into its own thread. I've asked about this before but got no answer. Sad
Back to top
View user's profile Send private message 
sheepy


Joined: 06 May 2011
Posts: 235
Location: GA

PostPosted: Sun 14 Oct 2012, 02:41    Post subject:  

SFR, thank you for sharing your attempt! However, it doesn't exactly solve my problem, hahaha. We must return to it later and fix ROX once and for all.

Flash wrote:
I hope I'm not hijacking this thread to ask if it might have anything at all to do with how ROX copies mp3 files from one flash drive to an mp3 player?

I'll try to be brief. If I just drag the directory containing the mp3 files (which are always numbered sequentially from, say, 1 to 200) into the mp3 player, ROX does not load the files in numerical order. The first few files might load correctly, but then ROX goes off into some weird mode and jumps way down the list. Eventually all the files get copied to the directory in my mp3 player, but every mp3 player I've tried (5 or 6 of them at least) plays the mp3 files in a directory in the order they were copied into the mp3 player, not in their numerical order. I need the files to play in numerical order.

I've found that if I first open in ROX the directory containing the mp3 files, "Select all" the mp3 files and click twice on the "Name" column heading, I can then drag the (still selected) files into the mp3 player and they will load in strict sequence from 1 to 200 (or however many there are.)

Is there something I can do to ROX that will allow me to simply drag a directory containing hundreds of mp3 files into my mp3 player, and ROX will copy the files in the directory in their numerical order?

If I'm hijacking this thread, let me know and I'll split this off into its own thread. I've asked about this before but got no answer. Sad

Hmm, that is odd. I've never had that happen to me. Did you try changing the list order to something else and then back to numerical again after copying?
Back to top
View user's profile Send private message Visit poster's website 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11157
Location: Arizona USA

PostPosted: Sun 14 Oct 2012, 08:26    Post subject:  

sheepy wrote:
Hmm, that is odd. I've never had that happen to me.

Normally the copy process goes so quickly you barely have time to see the names of the files being loaded, and few if any applications other than mp3 players care about the loading order. I'd never have thought to notice the loading order if my mp3 player hadn't caused me to go looking for why it jumped around in the order it played the files. You have to watch the play-by-play during copying very closely to see that the files are not being loaded in numerical order as you'd expect. Blink and you'll miss it. Also, copy may work correctly (by my definition) if there are not too many files in the directory. The directories I copy all contain at least 50 or so mp3 files. Most contain 200, and many contain 400 or more. A few went into the 900s.

Quote:
Did you try changing the list order to something else and then back to numerical again after copying?

No. I'll try that the next time I load up my mp3 player. I doubt it will make any difference though, because the files will have already been loaded into the mp3 player.
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1098

PostPosted: Sun 14 Oct 2012, 10:25    Post subject:  

Hey Flash

I think it's not ROX-Filer's specific issue, but general (tried under XFCE with the same result).
http://stackoverflow.com/questions/5167928/what-is-natural-ordering-when-we-talk-about-sorting

So far only in DeaDBeeF i was able to add extra column that contains real filenames:
right_click_the_columns -> Add Column -> Type = Custom -> Format = %f
and sort items in natural order by clicking it.

EDIT:
Also, if you're referring to a physical mp3 player, I guess that if files are copied in that incorrect order then maybe date stamps have something to do with that..?
(edit2: I mean mp3 player plays files according to their date stamps)

Next time when you copy the files to your mp3 player, just run this line:

Code:
while read LINE; do touch "$LINE"; done <<< "`ls -v /path/to/mp3_player/directory`"

(provide full path to the directory on mp3 player where mp3s are)

and let me know if it works.
If so I'll make right click app to ease the procedure.

PS. The above code simply modifies date stamps, according to natural sorting.

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.

Last edited by SFR on Sun 14 Oct 2012, 12:58; edited 3 times in total
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11157
Location: Arizona USA

PostPosted: Sun 14 Oct 2012, 11:30    Post subject:  

SFR, I think ROX has some control over the loading order. If I open the directory in ROX, Select all the files (Ctrl-A), click the Name column heading in ROX twice (the first time inverts the sort order of the filenames, the second time reverts it), then drag the selected files into the directory on the mp3 player and select Copy, the files load into the mp3 player in the correct order.

I don't know if ROX uses the cp (copy) command. I can't find anything in cp's help menu that sheds any light on the problem.

Sheepy, in the cp command's --help menu is an --update option:
Quote:
-u, --update: copy only when the SOURCE file is newer than the destination file or when the destination file is missing

Is that close to what you want?
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1098

PostPosted: Sun 14 Oct 2012, 12:07    Post subject:  

I agree, I meant drag'n'dropping the directory itself.

Looks like if a user chooses a certain sort order inside directory (not only by name - size, date, whatever works too) it's the only case when it's considered as a "custom" sort order during copying.

PS. I've edited my previous post (didn't notice your reply).

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1045s ][ Queries: 13 (0.0204s) ][ GZIP on ]