Page 1 of 1

Fixed!!! - Link to local file with spaces in path/file name. HowTo?

Posted: Thu Oct 08, 2015 1:49 pm
by Ovg
I want to add link to local file to Remark. It works fine if file path/name doesn't contains space(s). But I can't make link to file
with spaces in file/path name. HowTo? file://x:\xxxx%20xxxxxx.yyy doesn't works ....
Capture.PNG
Capture.PNG (6.57 KiB) Viewed 24069 times

Windows 7x64 SP1 CN 3.0

Re: Link to local file with spaces in path/file name. HowTo?

Posted: Fri Oct 09, 2015 10:22 am
by usbpoweredfridge
Hi Ovg,

The %20 not working may be a bug that has been introduced, because that is the official way to do it:
viewtopic.php?f=6&t=1239

However, %20 will still work in at least one situation - but I don't think it will work for you, as your folder path has the folder with the space as the very first folder. On my system, this works:
file:///c:\Users/Chris/Pictures/Screen%20Captures

Note that:
a. The first slash after the drive is a back slash, while all the other slashes are forward slashes;
b. The first folder does not have a space.

If I replace the forward slashes with back slashes, %20 does not work.

Now, if we use a path where the folder with the space is the first folder - such as in your example:
file:///D:/GOG.com%20Downloads
file:///D:\GOG.com%20Downloads

Neither of those actually work, as the slash after the drive letter must be a backslash - and %20 appears to break with backslashes.

tl;dr - I think this may be a bug. Alex will have to confirm this though - there may be a supported way to do this (it isn't listed in the help file though, I checked - I also tried the usual quoting characters, ie " ' <>).

Chris

Re: Link to local file with spaces in path/file name. HowTo?

Posted: Fri Oct 09, 2015 10:42 am
by Ovg
Hi usbpoweredfridge!

Thank you for such full and clear answer! I have suspected that this may be bug ...

WBR, Oleg

Re: Link to local file with spaces in path/file name. HowTo?

Posted: Fri Oct 09, 2015 3:37 pm
by Ovg
I have found a workaround:

I have created junction point to T:\My Documents:
mklink /j g:\My_Documents "t:\My Documents" and link file:///g:\My_documents/H323_1.doc works fine.

Re: Link to local file with spaces in path/file name. HowTo?

Posted: Mon Oct 12, 2015 12:20 pm
by CintaNotes Developer
Yes, this is a bug, thanks guys.
Will be fixed in the next update.

Another workaround would be to use the note body for this with the "Insert Link to File" command.

Re: Link to local file with spaces in path/file name. HowTo?

Posted: Sun Oct 18, 2015 8:32 am
by usbpoweredfridge
Fixed in v3.01 Beta :)

Chris

Re: Link to local file with spaces in path/file name. HowTo?

Posted: Sun Oct 18, 2015 2:42 pm
by Ovg
Many thanks! :-)

Re: Link to local file with spaces in path/file name. HowTo?

Posted: Sat Oct 24, 2015 8:44 pm
by Ovg
I have found another issue with links. Links with '&' sign inside isn't recognizing by CN now, but if I change a few backslashes (\) before '&' sign to slashes (/) and then return them again to backslashes, it will.

PS All type of links are affected.

WBR, Oleg
Capture.png
Capture.png (12.1 KiB) Viewed 23940 times

Capture2.PNG
Capture2.PNG (16.5 KiB) Viewed 23939 times

Re: Link to local file with spaces in path/file name. HowTo?

Posted: Mon Oct 26, 2015 11:18 am
by usbpoweredfridge
There are a number of characters affected - + for example (eg C:\TempFiles\Test+Test.txt is cut off at the first 'Test'). Alex will probably have to give some thought about what characters are allowed in Windows filenames - a question that is not as easy to answer as what you may think - and then go through and make sure all are covered.

Chris

Re: Link to local file with spaces in path/file name. HowTo?

Posted: Wed Oct 28, 2015 12:11 pm
by CintaNotes Developer
Thanks for the report guys, I'll check it out and fix in the next update.

Re: Link to local file with spaces in path/file name. HowTo?

Posted: Sat Nov 14, 2015 2:00 am
by usbpoweredfridge
& and + fixed in 3.02 final :)

Chris

Re: Fixed!!! - Link to local file with spaces in path/file name. HowTo?

Posted: Sat Dec 12, 2015 12:15 pm
by usbpoweredfridge
Found another character that breaks the file link scheme - the comma. So this filename for example is not recognised:
Senator Heroically saves Obsolete Program, 20,000 Coincidental Jobs in his State.mp4

CN creates a link up to the first comma, and then stops.

Chris

Re: Link to local file with spaces in path/file name. HowTo?

Posted: Sat Dec 12, 2015 12:32 pm
by Ovg
Also:

` $ { } =

WBR, Oleg

Re: Link to local file with spaces in path/file name. HowTo?

Posted: Sun Dec 13, 2015 8:45 am
by CintaNotes Developer
You should use the percent encoding for such filenames.

Re: Link to local file with spaces in path/file name. HowTo?

Posted: Sun Dec 13, 2015 8:57 am
by usbpoweredfridge
I sorta figured that would be the answer, was just hoping it may have been added natively alongside the + sign :) For anyone wondering, here are the official URI encodings:
http://www.w3schools.com/tags/ref_urlencode.asp

Comma is %2C for example, so my example filename will be:
Senator%20Heroically%20saves%20Obsolete%20Program%2C%2020%2C000%20Coincidental%20Jobs%20in%20his%20State.mp4

I know at one point in time, I had a program installed that could decode these characters (handy for pasting in a encoded URL to get the more plain language version of it), but I'm not aware of one that goes back the other way. There is probably an obscure website somewhere where you can paste filenames to be encoded though.

Chris

Re: Link to local file with spaces in path/file name. HowTo?

Posted: Sun Dec 13, 2015 9:13 am
by Ovg
Alex, Chris!

Many thanks for suggestions!!! :mrgreen:

WBR, Oleg