Problems importing multiple RTF files

Ci
Cinder6
Posts: 146
Joined: Mon Feb 22, 2010 10:04 pm

Fri Jun 08, 2018 8:27 pm Post

I'm trying to import several novels into Scrivener from another application (Ulysses). I already have all my scenes in RTF format, and I have my scenes and folders numbered in the order that they should appear in the book. For example: "1 - Scene Name", "2 - Another Scene", "3 - A Really Great Scene". Those scenes would then be in a folder named something like '1 - Name of Chapter'.

I'm encountering two problems. The first is that Scrivener refuses to allow me to drag these chapter folders into the Manuscript folder, giving me the following error:

The Draft folder can contain text and folder documents only. To add an image to your Draft, either drag an image into the text of one of the documents, or place the cursor where you wish the image to be placed in the text and use the Insert menu.


I have verified the only files in the folders are .rtf. There aren't even any .DS_Store files, nor are there any images, etc. In order to put the files and folders into the manuscript, I must first drop them into "Research", then drag them as a group into the manuscript folder. I don't understand why this would work, but I can't go directly from my desktop to the manuscript folder. (Using File->Import into the manuscript also works.)

The second problem is far more annoying: The scenes aren't imported in alphabetical order! I've created a screenshot to show what happens, though Scrivener is somewhat inconsistent with whether scenes in a folder will be in order or not.

Image

I know for a fact it isn't sorting them based on access time, modified date, etc., because I just created those scenes with a shell script. If it was based on modification/creation date, then 5 should be either first or last, not 4th. EDIT: On a wild hunch, I opened up a Playground in Xcode and made a dictionary with "1", "2", "3", "4", "5" as keys. I then printed out the results of Array(dict.keys), and what did I get? 4 1 2 5 3, just like in my screenshot. Maybe it's just an interesting coincidence, but now I'm wondering if the scene names are being hashed, but the keys aren't being sorted when they're put into the binder.

Thankfully, the folders, at least, always import in the correct order.

Please let me know if I need to clarify anything or even provide a screen recording.

(For now, I've written a program that directly modifies the .scrivx file, sorting the BinderItems that correspond with the scenes. If that makes you cringe, well ... I was bored!)

User avatar
KB
Site Admin
Posts: 20732
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Mon Jun 11, 2018 1:08 pm Post

Hi,

On your first issue, the only thing that can trigger that message is if there is a file in the import batch that does not conform to a known text file type. Scrivener just asks macOS to check the list for specific types, and shows that error if the list contains any non-text types. Would it be possible to show a screenshot of the files in the Finder? Or even zip them up and send them to us so that I can test myself?

On your second issue, Scrivener imports the files in the order that the Finder passes to it - that's the only order it knows, so this odd order must indeed have been the one assigned by Finder to the dragged list of files.

However, you didn't need to write your own tool to reorder them (as impressive as that is)! You can just go to Edit > Move > Sort to sort binder items alphabetically.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

Ci
Cinder6
Posts: 146
Joined: Mon Feb 22, 2010 10:04 pm

Mon Jun 11, 2018 11:31 pm Post

It's weird; I can't get the "can't import" message to print again, even though I've literally just re-run the same command as before to generate the files in the screenshot. I'll let you know if it happens again.

KB wrote:However, you didn't need to write your own tool to reorder them (as impressive as that is)! You can just go to Edit > Move > Sort to sort binder items alphabetically.

Well, that's pretty funny.

User avatar
rdale
Posts: 2014
Joined: Tue Jul 14, 2015 1:07 pm
Platform: Mac, Win + iOS
Location: St. Louis, MO
Contact:

Tue Jun 12, 2018 12:42 pm Post

Cinder6 wrote:
KB wrote:However, you didn't need to write your own tool to reorder them (as impressive as that is)! You can just go to Edit > Move > Sort to sort binder items alphabetically.

Well, that's pretty funny.

For future reference, trying the Help->Search bubble can lead you to menu commands that are buried deep in the menu structure. The more you get to know Scrivener, the easier it is to guess a word in the menu item you're looking for--it's how I navigate the menu in most programs these days.
FKA: robertdguthrie
AKA: R Dale Guthrie, Robert, Mr. Obscure, and "Oh, it's you again".

Ci
Cinder6
Posts: 146
Joined: Mon Feb 22, 2010 10:04 pm

Tue Jun 12, 2018 10:11 pm Post

Yeah, I know how to use the search feature. It's just not a feature I thought it would have in the first place.