cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

file_copy is changing case when searching for local path

New member | Level 1
New member | Level 1

I'm writing a sync client (in Ruby) to copy a folder from local to Dropbox.  My code is as follows:

    file_copy(settings['local_folder'],settings['remote_folder'])

I get the following error:

    in `parse_response': Path '/home/user/projects/clients/' not found (DropboxError)

This is true; that folder doesn't exist.  It's '/home/user/Projects/Clients'

Is there any way to fix this *other* than renaming all of my local folders to lowercase?  This is on my personal Linux machine, so in this case, it would be a hassle for all other file references and scripts I have.

2 Replies 2
Highlighted

Re: file_copy is changing case when searching for local path

Dropboxer
Dropboxer

Is the path "/home/user/Projects/Clients" a local path on your machine? The file_copy method takes two parameters, both of which are supposed to be remote paths in Dropbox (not local paths), in order to copy a file or folder already in Dropbox to another location in Dropbox. They should be paths relative to the root of the Dropbox. 

In order to upload files and folders, you'll need to loop through the files and call one of the methods to upload, e.g., put_file, as necessary.

Highlighted

Re: file_copy is changing case when searching for local path

New member | Level 1
New member | Level 1

Got it, thanks for clearing this up for me, Gregory.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?