Extra Rox attributes

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
sheepy
Posts: 233
Joined: Sat 07 May 2011, 03:26
Location: GA
Contact:

Extra Rox attributes

#1 Post by sheepy »

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.

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

Re: Extra Rox attributes

#2 Post by SFR »

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/ ... ed3.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. :lol:
EDIT2: "No-clobber"
Oh yes, I see my mistake, sorry. :oops:

Greetings!
Attachments
roxmod.jpg
(47.01 KiB) Downloaded 676 times
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#3 Post by 666philb »

my gripe is that the quiet option doesn't work when copying!
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#4 Post by SFR »

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!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#5 Post by Flash »

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. :(

User avatar
sheepy
Posts: 233
Joined: Sat 07 May 2011, 03:26
Location: GA
Contact:

#6 Post by sheepy »

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. :(
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?

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#7 Post by Flash »

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.
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.

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#8 Post by SFR »

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/5167 ... ut-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: Select all

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!
Last edited by SFR on Sun 14 Oct 2012, 16:58, edited 3 times in total.
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#9 Post by Flash »

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:
-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?

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#10 Post by SFR »

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!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

Post Reply