I think it worked a long time ago. I have the .txt file marked on one side, and the collection coll://neuImp (which is empty) open on the other side. Yet i get some error message
Sorry, but i m one of those every very stupid persons, who needs a literally comment to solve this problem I do not understand what you are talking about. Please give me a an exact code of what to do.
I don't understand. The code is already in my first reply.
Have you tried the command from that post?
If it still doesn't work, it must at least fail in a different way, as it would not generate the same error message as your original command. If it's still not working, tell us the details.
Thanks Leo. I have overlooked the quotes. Would it be possible to create a collection, based on the current text file, instead of always using "NeuImp"? For example, when the text file is called "Sommer 2021", the code would create a collection by that name.
(I also changed the {f} at the end to the longer version {filepath$} which does the same thing but is easier to understand, and added the $ to make it not run anything if no file is selected.)
Thank you, Leo, almost perfect. How would i create a folder of that same name in coll:// prior to your command? So, for instance, if the text file is named Test01, the code would create a new collection by that name, and then import the contents. I have played around with {file$}, but can't figure it out how to achieve it.
I think it should create the collection automatically (at least if there isn't an error opening the text file etc.). I'd be surprised if it doesn't, at least. Have not double-checked, though.
In any case, you can use a command like this to create a collection:
So this will create a collection and then add the file list to it:
CreateFolder READAUTO=NO NAME coll://{file$|noext}
dopusrt /col import /utf8 coll://{file$|noext} {filepath$}
(I realised we must be running this from an Opus button/hotkey/etc., so we can use dopusrt on its own as a shortcut, to avoid specifying the full exe path. Also removed some quotes that aren't needed as they'll be added by the {file$|noext} code automatically when needed. But the only real change, compared to before, is adding the CreateFolder line.)
Great work, Leo, as always. It works now as intended. However, for some reason the older code wouldn't create that folder. And yes, i'm using both, a button and a shortcut. I have also added Go Coll:// openindest which works fine. Thanks a lot!