NOVICE: Invalid Path (link)?

Hey guys!

I’m trying to find a way to open local files with their associated program. But I found a problem: It looks like TiddlyWiki can’t recognize the path I’m going through.

<a href="file:///D:/Users/criep/Docs(offline)/%C2%A7%20%C3%81rea%20ECLESIAL%20(offline)/B1(a1)-Vida%20Celebrativa%20(CULTOS)/PREGA%C3%87%C3%95ES%20CAMPO%20MOUR%C3%83O%202022/CSS%202022-01-29%20Mt%2013.44%20(O%20Maior%20Tesouro%20de%20Todos).docx">CASTELO-FORTE (lista-pedidos).docx</a>
Or yet…
<a href="file:///D:\Users\criep\Docs(offline)\§ Área ECLESIAL (offline)\B1(a1)-Vida Celebrativa (CULTOS)\PREGAÇÕES CAMPO MOURÃO 2022\CASTELO-FORTE (lista-pedidos).docx">CASTELO-FORTE (lista-pedidos).docx</a>

I believe that it cannot work with the special characters of Portuguese (~, ç, etc) in the identified path. Does anyone know how I can get around this problem?

I think the best option would still be to be able to use the “Launch Application” that I even found references, but I couldn’t find the mentioned plugin for download. It would be the perfect solution.

Does anyone know of an alternative that works?

Hi @Claudio_Rieper,

I very often use links to office files in TiddlyWiki5 at work and the file names often contain Latin characters (é à ç ù …) and spaces, so I think your example should work.

However, you did not mention the error raised when you try the first <a href="...>...</a> example. Usually, when linking to external documents doesn’t work for me, the problem comes from an error in the path. So I came down to using every time the same workflow in order to make sure the path is good.

Here is the workflow I use with Firefox, I also tried it at home with Firefox and Chromium on Linux, but I guess it works with other browsers too:

  1. Open the folder containing your document in Windows’ Explorer
  2. Navigate one step up, to the parent folder – in your example, it should be B1(a1)-Vida Celebrativa (CULTOS) so that you can see the name of the folder which contains your document
  3. In your Browser, open a new window or a new tab
  4. Drag the folder from Explorer to your Browser’s newly open window/tab and drop it inside the blank page. This will open the folder in an HTML view of the filesystem: this way, you can browse your filesystem from within the Browser
  5. Browse your filesystem until you see your document
  6. Right click on your document and copy the link in the clipboard
  7. Paste the link inside a tiddler in TiddlyWiki and use it the way you like.

As a side note, in your example you are using HTML tags <a>...</a> for your link, but I recommend using TW linking system instead [[...]]. With your example:

[[CASTELO-FORTE (lista-pedidos).docx|file:///D:/Users/criep/Docs(offline)/%C2%A7%20%C3%81rea%20ECLESIAL%20(offline)/B1(a1)-Vida%20Celebrativa%20(CULTOS)/PREGA%C3%87%C3%95ES%20CAMPO%20MOUR%C3%83O%202022/CSS%202022-01-29%20Mt%2013.44%20(O%20Maior%20Tesouro%20de%20Todos).docx]] should work if the path is correct.

Hope this helps,

Fred

Hi @tw-FRed

First, thank you very much for taking the time to get back to me.

Despite having referenced in the first example a href. I also tested the method you suggested. But unfortunately, both failed.

At first I used the following example, as you suggested::
[[docx-tw|file:///D:/Users/criep/Docs(offline)/Area%20ECLESIAL%20(offline)/B1(a1)-Vida%20Celebrativa%20(CULTOS)/201x-mm-dd%20Livro%200.0-0%20(modelo).docx]]
and then…
[[docx-tw|file:///D:/Users/criep/Docs(offline)/%C3%81rea%20ECLESIAL%20(offline)/B1(a1)-Vida%20Celebrativa%20(CULTOS)/201x-mm-dd%20Livro%200.0-0%20(modelo).docx]]

Note however that the word “Area” was written without the acute accent used in Portuguese, which should be “Área”, with Latin characters.

In the first situation (“Area”) the link worked correctly, opening the file in Word for editing, using it internally in TiddlyDesktop.

In the second situation, when I used (“Área”) the link stops working. When I tried to see how it behaved in the browser (Chrome), it returns a message saying: “FILE_NOT_FOUND”.

Can you imagine what you could be doing to correct this inability of both the browser and Windows 10 to handle Latin characters?

Interesting to note though, that when using the browser to browse the system folders, and then copy the file link to the clipboard, as you suggested, the browser had no problems encoding the path and filename I used in example.

In advance, thank you very much for your help and attention.

Thaks for all.

If you remove the odd characters in the file and create a link, do you get it to work at all?

What kind of drive is your D: drive?

Hi @twMat

As I mentioned in the example suggested by Fred, yes, I took only one Latin character out of the entire file path.

I renamed the folder: “Área ECLESIAL (offline)” to “Area ECLESIAL (offline)”.

The only change I made was to replace the Latin character “Á” with “A”.

In the first case, the link doesn’t work, with the removal of the Latin character, both TiddlyDesktop and the browser can find the local file.

Even if you use the same path to run a cmd in a batch file, the system cannot see the path of the local file either. If you change the “Á” to “A” it opens the file normally.

@echo off start winword.exe "D:\Users\criep\Docs(offline)\Área ECLESIAL (offline)\B1(a1)-Vida Celebrativa (CULTOS)\201x-mm-dd Livro 0.0-0 (modelo).docx"

If you can help me to identify the reason for the problem, I would appreciate it.

Thanks.

Hi, @Mark_S

The only drive used on my desktop is an SSD drive. Could that be the problem?

Thanks.

If there is only one drive, then it must be partitioned. On Windows the first partition is almost always C: . Are you able to access the c: drive? Perhaps the temp directory? You could test by putting your file in a directory like “C:\temp\Área ECLESIAL (offline)\B1(a1)-Vida Celebrativa (CULTOS)\201x-mm-dd Livro 0.0-0 (modelo).docx” . Then see if that path works as a link.

Going from memory. If you open file explorer and right-click on D: you should be able to get a menu for the drive’s properties. Then you can see how the drive was formatted. NTFS should support the complete unicode set, but other formats may not.

No. The browser doesn’t know, where the file comes form.

Hi @Mark_S

I created a temporary working folder. The problem repeats itself.

C:\temp\Users\criep\Documentos(offline)\Área ECLESIAL (offline)\B1(a1)-Vida Celebrativa (CULTOS)\201x-mm-dd Livro 0.0-0 (modelo).docx

I tried to click on the properties of both Disk “C:” and “D:”, but I couldn’t identify which unicode it was formatted with. Can you leave a screenshot of the screen or the way to get this information?

But I imagine that if this is the problem, I think it would be logical to reformat the disk to eliminate the problem. Correct?

That’s what I call getting to the heart of the problem. rsrsrs… How exciting!

I didn’t want to have to take out the Latin characters and change all the naming used in the directories to solve this issue.

Is there any passive internal coding solution to get around this problem?

Thanks for all.

if you go to a command (terminal) box and type

winword.exe "C:\temp\Users\criep\Documentos(offline)\Área ECLESIAL (offline)\B1(a1)-Vida Celebrativa (CULTOS)\201x-mm-dd Livro 0.0-0 (modelo).docx"

Does that work? If not, what is the error?

Hi @Mark_S

Amazing. I am wordless. It worked!

start winword "D:\Users\criep\Docs(offline)\Área ECLESIAL (offline)\B1(a1)-Vida Celebrativa (CULTOS)\PREGAÇÕES CAMPO MOURÃO 2022\CSS 2022-01-29 Mt 13.44 (O Maior Tesouro de Todos).docx"

I typed the command with the file path with Latin characters as you suggested directly into the Windows “Command Prompt” command line and guess what happened, it worked.

But if I put the same command inside the batch file, and run it, it can’t open the file.

A light of hope was kindled for me. I found that by entering the below command at the beginning of the batch file, the command works.

mode con cp select=65001
start winword "D:\Users\criep\Docs(offline)\Área ECLESIAL (offline)\B1(a1)-Vida Celebrativa (CULTOS)\PREGAÇÕES CAMPO MOURÃO 2022\CSS 2022-01-29 Mt 13.44 (O Maior Tesouro de Todos).docx"

But how to implement this page encoding when writing the command inside Tiddler?

Thank you for not giving up on solving the problem so far.

Hi Guys!

With the help of @Mark_S and everyone, and a little more research I managed to find out how to make the batch file open the docx file with word, without removing the latin characters from the file path. As the example follows.

mode con cp select=65001
start winword "D:\Users\criep\Docs(offline)\Área ECLESIAL (offline)\B1(a1)-Vida Celebrativa (CULTOS)\PREGAÇÕES CAMPO MOURÃO 2022\CSS 2022-01-29 Mt 13.44 (O Maior Tesouro de Todos).docx"

Does anyone know if there is any way to do the same with the normal encoding of Tiddler (without a batch file), so that the Tiddler link below is possible, also able to recognize the Latin characters in the link within TiddlyDesktop?

[[docx-tw|file:///d:\Users\criep\Docs(offline)\Área ECLESIAL (offline)\B1(a1)-Vida Celebrativa (CULTOS)\PREGAÇÕES CAMPO MOURÃO 2022\CSS 2022-01-29 Mt 13.44 (O Maior Tesouro de Todos).docx]]

Thanks in advance for everyone’s attention.