Best answer

Move files that contain specific phrase within the file name from one Dropbox directory to another

  • 31 August 2022
  • 5 replies
  • 343 views

Hi, Zapier Community. Quick question. 

I’ve got a Dropbox folder that contains several files with a specific phrase included in the file name that I need to move to a subdirectory.  

So, for example, let’s say I want to move ALL files that contain the phrase “bananas” (as part of the file name, i.e. myfile_bananas1.pdf, myfile_bananas2.pdf) from one folder to another.  I know I can run a filter on files that “contain” phrases, but it seems as though the action item is limited to migrating a single file with a static file name.  This is absolutely useless.  

Can this be done?  Anyone have any ideas on how to achieve? 

Appreciate the input! 

icon

Best answer by Danvers 22 September 2022, 12:45

View original

5 replies

Userlevel 7
Badge +9

Hey there, @griffigr! Thanks for reaching out and welcome to the Community! 🎉

Are you able to expand a bit more on your overall workflow and goals? 🙂

It sounds as if you’re looking to do a bulk transfer of existing files from one location to another - does that sound right? If so, Transfer by Zapier may be a better solution for you!

Otherwise, you’re absolutely correct - standard zaps work on a 1:1 basis and only on new, incoming data.

So, "When this [trigger] happens in [x] app, do that [action] in Dropbox." 

 

I’ll also pop some resources below that may be useful if you’re just getting started with Zapier:

I hope some of this helps! Keep us in the loop. 🤗

It looks like DropBox isn’t a viable option for “Source” data within the transfer protocol. Transfer also doesn’t have a cron/scheduling component, which again, is pretty useless. 

 

 

Userlevel 7
Badge +8

Hi @griffigr 

 

When do you want the zap to trigger exactly? If you are looking to transfer existing data then you cannot do that currently with Dropbox. You can however suggest the app you need here 

 

 

Otherwise, Zapier needs a Trigger action. Whether this is a new file uploaded to dropbox or a a scheduled zap (not sure why you need to schedule it though so it would be nice to shed some light on that)

 

Let us know more about your workflow, like @christina.d always says, in the form of “When This Happens That Happens.”

 

 

We’ve got partner files that flow into a server directory via FTP every night.  On a nightly basis, we receive around 100 files. I’ve got a WinSCP script that downloads the files from FTP and moves them to a central DropBox file.  We then need to route a portion of these files to the correct team folders.  Some go to finance. Some go to legal. Some go to marketing, etc. 

I could always add a dummy file with a static file name that gets transferred every night in order to trigger the zap, but that’s a pretty lazy workaround.  Not sure why a time element can’t be used as trigger.  Every cron job on the planet uses this logic.  And this still wouldn’t solve for Zapier’s inability to conditionally grab ALL files that contain a certain phrase. WinSCP or Power BI might be a better option for this kind of task.  

 

Userlevel 7
Badge +12

Hi @griffigr!

To address one of your needs for Transfer, we do have an open feature request for adding a scheduling option for Transfer, let me know if you’d like to be added to that feature request, which means that we’ll send you an email when there’s an update on that. 

 

In terms of setting up a Zap that would work with what’s available now, from what you’ve described it should be possible to do what you need. 

 

Start with the trigger New File in Folder. I’m assuming that the files from the ftp server are uploaded to a specific place, if so you can specify that folder in the set up of the trigger. 

For the conditional logic of ‘if file contains x, send to folder 1’ there’s a few different ways that you can do this. If you have a Professional Zapier plan or higher, the easiest way is with Paths. For each path you set up your logic statement (eg if filename contains banana). Then you would use the Move File action for dropbox to move the file to the relevant folder. 

 

You can set up the Move file step so that it moves the File that triggered the Zap by adding that as a custom value in the File field. For the custom value, use the Path field that you get from the trigger data. 

 

Does that cover what you need the Zap to do? Let us know if you have any questions!

Reply