Results 1 to 20 of 20

Thread: invalid characters / syncing with Dropbox

  1. #1

    Default invalid characters / syncing with Dropbox

    Eaglefiler seems to make use of names in the style of : libraryname/subfolder/filename, etc. ... but when you sync with Dropbox, no Window computer can see a file whose name contains a "/".

    My efforts to strip these out using the file-rename script don't seem to work. (I select library then run the script, searching for "/" and replacing with "." or "|" (or somesuch). Is that the right procedure? A large swath of my files are not syncing ...

  2. #2

    Default

    Quote Originally Posted by CTS View Post
    Eaglefiler seems to make use of names in the style of : libraryname/subfolder/filename, etc. ... but when you sync with Dropbox, no Window computer can see a file whose name contains a "/".

    My efforts to strip these out using the file-rename script don't seem to work. (I select library then run the script, searching for "/" and replacing with "." or "|" (or somesuch). Is that the right procedure?
    If you mean this script, it operates on the selected files. Selecting the library itself will do nothing. Also, this script operates on filenames at the Unix level. So to search for “/” as shown in the Finder you would need to search for “:” (and vice-versa).

    I’m not sure what you mean about “libraryname/subfolder/filename”. That looks like a path, not a filename. EagleFiler will generally only put “/” in a filename if you import a Web page containing that character in the title.

  3. #3

    Default

    Yes, I was figuring out what you've pointed out. Drop box will give a list of "bad" file names, and it presents the whole file path, which confused me. I should concentrate on the name only.

    thanks for the tip on / and : ...

  4. #4

    Default

    Would it make sense to elaborate this script into a RenameForDropbox script to conform with the https://www.dropbox.com/help/145 stricture to "avoid characters incompatible with the Windows file system." Perhaps a default substitution of a space for < > : " / \ | ? *
    Last edited by humanengr; 06-07-2011 at 03:39 AM.

  5. #5

    Default

    A "make filenames compatible with Windows/Dropbox" would be wonderful ....

  6. #6

    Default

    Quote Originally Posted by CTS View Post
    A "make filenames compatible with Windows/Dropbox" would be wonderful ....
    Here’s a script to do that.

  7. #7

    Default

    I don't think that could have been done any faster. ;-> !

    Iiuc, replacing with a space should suffice quite nicely for most cases. But as there might be special cases (such as backslashes needed in Applescripts for shortcuts), maybe include a caveat in the instructions?

  8. #8

    Default

    That's a godsend for my workflow.

  9. #9

    Default

    I neglected to include the one other Dropbox requirement: trimming trailing spaces in the basename.

    I was also thinking that perhaps the conversion should be more finely parsed to reflect how characters are typically (?) used in filenames -- something like:

    on processName(_name)
    set _invalidChars to "<>//\\|"
    repeat with _c in _invalidChars
    set _name to my replace(_name, _c, "-")
    end repeat
    set _invalidChars to "\"?*"
    repeat with _c in _invalidChars
    set _name to my replace(_name, _c, " ")
    end repeat
    set _invalidChars to ":"
    repeat with _c in _invalidChars
    set _name to my replace(_name, _c, " -")
    end repeat
    return _name
    end processName

    AFAIR, within basenames, a space is a good-enough substitute for most double quotes, question marks, and asterisks. But as backslash, forward slash, and vert bar are only used as separators, a hyphen is better than a space for readability (IMO). I preceded the colon with a space to match the space that generally follows within basenames.

    Thoughts about including the above in your script?
    Last edited by humanengr; 06-19-2011 at 05:22 AM.

  10. #10

    Default

    Quote Originally Posted by humanengr View Post
    Thoughts about including the above in your script?
    Sounds good; thanks.

  11. #11

    Default

    I’ve also modified the script to remove trailing spaces.

  12. #12

    Default

    This script isn't working for me. Do I have to do something more than download the compiled version and move it to the designated location?

    Activity window shows no ... activity ... though the script for removing things one character at a time is working.
    Last edited by CTS; 06-22-2011 at 11:30 AM. Reason: bad typo

  13. #13

    Default

    [removed by author (bad cold)]
    Last edited by humanengr; 06-22-2011 at 03:02 PM.

  14. #14

    Default

    Quote Originally Posted by CTS View Post
    This script isn't working for me.
    Sorry about that. It was missing the “return _string” line.

  15. #15

    Default

    Great. (Glad it wasn't user error ...)

  16. #16

    Default

    Attached is a Unicode version of the script that replaces
    • ->, =>, etc., arrow-like strings with Unicode arrows.
    • Other illegal characters (including > and < not in arrows) with the corresponding Unicode fullwidth characters.


    IMHO, this version generates filenames that are more readable than that given by ASCII substitutions.

    The script also has some elaborated logic to handle "/" in Mac filenames.

    The Unicode substitutions are:
    <--> and <-> to ↔ (left-right arrow Unicode 034D)
    --> and -> to ➝ rightwards arrow Unicode 2192)
    <-- and <- to ← (leftwards arrow Unicode 2190)
    <==> and <=> to ⇔ (left-right double arrow Unicode 21D4)
    ==> and => to ⇒ (rightwards double arrow Unicode 21D2)
    <== and <= to ⇐ (leftwards double arrow Unicode 21D0)
    > to > (fullwidth greater-than sign Unicode FF1E)
    < to < (fullwidth less-than sign Unicode FF1C)
    ? to ? (fullwidth question mark Unicode FF1F)
    * to * (fullwidth asterisk Unicode FF0A)
    / to / (fullwidth solidus Unicode FF0F)
    \ to \ (fullwidth reverse solidus Unicode FF3C)
    | to | (fullwidth vertical line Unicode FF5C)
    : to : (fullwidth colon Unicode FF1A)
    " to " (fullwidth quotation Unicode FF02)

    Also attached is a Smart Folder that identifies filenames with illegal characters. To use: in Finder, unzip and copy into the Smart Folders folder in each EF library, click the "bad filenames" Smart Folder within a library, and select all files in the list window. Then run the attached AppleScript. (Note: the Smart Folder does not find files for which the only problem is that the basename ends with a space.)
    Last edited by humanengr; 09-05-2011 at 09:00 AM. Reason: added "bad filenames" Smart Folder

  17. #17

    Default Attachment?

    Hi!

    I know this thread is a bit old, but is it user error that I cannot find the attachments? Neither script nor smart folder show up on my screen…

    Does anybody have an idea where I can find the two MIAs?

    Thanks!

    Hendrik

  18. #18

    Default

    Quote Originally Posted by hselig_EF View Post
    I know this thread is a bit old, but is it user error that I cannot find the attachments? Neither script nor smart folder show up on my screen…

    Does anybody have an idea where I can find the two MIAs?
    I’m not sure why the attachments aren’t showing up, but you can get them from the Internet Archive.

  19. #19

    Default

    Attached
    hth

    EDITED: Here's a dropbox link to same: https://www.dropbox.com/s/sfn1ypz5wk...icode.zip?dl=0

  20. #20

    Default Thanks!

    Wonderful! Thanks lot to both of you!

    (…and I totally did not think about the way-back-machine. Great reminder!!)

Similar Threads

  1. Dropbox and Spamsieve
    By bbbdco in forum SpamSieve
    Replies: 1
    Last Post: 05-20-2010, 12:00 PM
  2. Spam in non-Latin characters
    By Bob Jacobson in forum SpamSieve
    Replies: 5
    Last Post: 06-01-2009, 10:02 PM
  3. Dropbox and Metadata
    By nielsk in forum EagleFiler
    Replies: 2
    Last Post: 03-13-2009, 10:37 AM
  4. Using a .sparseimage with Dropbox
    By bwilkins in forum EagleFiler
    Replies: 2
    Last Post: 03-02-2009, 11:18 AM
  5. syncing
    By chuckimblair in forum EagleFiler
    Replies: 5
    Last Post: 07-04-2007, 02:56 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •