Jump to content
sr_navarre

I desperately need someone to create a random file picker for me. Details inside.

Recommended Posts

A while back, a user named Claui created this workflow for me. I absolutely appreciate her attempt, but it never quite did what I needed and now it doesn't seem to work at all. Could some kind soul who knows how to do this kind of thing take another stab at it, maybe using Claui's work as a jumping-off point? 

 

Here's what I need to do.

 

Say I have a folder with 1,534 files. Some are videos, some are pictures, some might be other formats. I want a workflow where I can activate it (either through a keyword or a file action) and have it ask me how many of each file type I want. 

 

So, let's say I want 12 videos and 45 images. I pop these numbers into the workflow and it copies 12 random videos and 45 random images into another folder. Then, I can run the workflow again with totally different numbers and get a whole different set of files.

 

A big caveat here is that this workflow must support subfolders. So the files it selects could come from the top-level folder or any one of however many subfolders there may be.

 

Can anyone build this for me? I'll owe you something. I can't code, but if there's anything I can do in return,  I'm your guy.

 

Thanks so much.

Share this post


Link to post
13 hours ago, sr_navarre said:

but it never quite did what I needed and now it doesn't seem to work at all.

 

It helps if you explain why it doesn’t do what you want, and why it doesn’t work (open the debugger, set the log output to “All Information”, and post the output).

 

I’m guessing the breakage is due to the Workflow using an outdated (six years old) framework.

 

13 hours ago, sr_navarre said:

Some are videos, some are pictures, some might be other formats.

 

Do the videos and images have fixed formats? For example, for videos are they ever only mp4 or mkv and never avi? If so, what are the common extensions?

 

13 hours ago, sr_navarre said:

either through a keyword or a file action

 

Does that mean it must support both, or that it can be only one of them and you don’t care which?

 

13 hours ago, sr_navarre said:

copies (…) into another folder.

 

Is the new directory fixed (if so, where is it?) or should picking it also be part of the Workflow?

 

13 hours ago, sr_navarre said:

with totally different numbers and get a whole different set of files

 

Does that mean the new files must be different, or that they’re random again (meaning some may be repeated)?

 

13 hours ago, sr_navarre said:

A big caveat here is that this workflow must support subfolders.

 

That’s not a big problem. It’s one of the easier parts.

 

13 hours ago, sr_navarre said:

I'll owe you something. I can't code, but if there's anything I can do in return,  I'm your guy.

 

This is not at all something you have to do, but you may offer to (monetarily) compensate the person who obliges your request. Especially if the coder has a tip jar, sending a few bucks their way for a few beers will be appreciated. Your request isn’t terribly hard but it is time-consuming. Again, this is not mandatory, and even if you do it doesn’t have to be a large amount. I’m mentioning it because it’s a common way to show appreciation. The act of doing it can mean more than the actual amount.


I don’t want to be the one to code this because I suggested a reward and that would seem I was asking for something specific for myself. But here’s a thought: why not ask Claudia, on the repository? She’s a good coder and a nice person (I know because she’s a fellow Homebrew maintainer), and has already done the first version, so she might be able to improve it faster.

Share this post


Link to post
1 hour ago, vitor said:

Your request isn’t terribly hard but it is time-consuming

 

To add to this, you're much more likely to get assistance if you ask us to help you write the workflow, not to write it for you.

 

Share this post


Link to post
On 9/28/2018 at 10:15 AM, deanishe said:

 

To add to this, you're much more likely to get assistance if you ask us to help you write the workflow, not to write it for you.

 

 

Thanks for all of your good tips. I will try asking Claudia again and I will incorporate the information you requested in a future post. 

Share this post


Link to post

Apologies to everyone for going about this the wrong way. I’ll get back to this post sometime soon and try to address some of the issues that need addressing. 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×