Mac or Windows?
Are you trying to open the file from plugin code, a script or just opening it in Illustrator?
The percent sign in the name is probably something to do with it.
I open by Code, in Window.
"115%1.ai","115%9.ai" open ok.
"115%11.ai","115%10.ai",... open error.
The files "115%11.ai","115%10.ai" do definately exist?
Can you show your code?
Is that your real code? You have two double quotes at the end of the first line.
your 5 posts in before you hint at the fact that you are working with VB and not JS.
not so confident in VB.
but in JS the open function requires a file object not a path.
also the \ can act as an escape char.
var myFile = File("D:/Data/115%11.ai"); app.open(myFile);
so having a play with VB.
Set appRef = CreateObject("Illustrator.Application") Set docRef = appRef.Open("C:\Users\tristan\Desktop\~~~Crap\11511.ai")
this works no problem
Set appRef = CreateObject("Illustrator.Application") Set docRef = appRef.Open("C:\Users\tristan\Desktop\~~~Crap\115%11.ai")
VB is not my thing and I don't do much with it so it has me a little
if I open the file and run this:
Set appRef = CreateObject("Illustrator.Application") msgbox appRef.ActiveDocument.Name
I get a message box with:
maybe if CarlosCanto is online he may shed some light, as he plays with VBscript and he is a fountain of knowledge...
The reason is that in VB strings you can use % followed by a hex number to represent a single character with that ascii code, e.g. %61 = a
When you have 115%1.ai or 115%9.ai you have a single digit and a period after the %, as this is not a valid hex number, AI just treats the % as a % character. When you have 115%10.ai or 115%11.ai, you have a valid hex number after the %, so %10 gets replaced by the character with ascii code 16 (hex 10) and %11 gets replaced by the character with ascii code 17 (hex 11).
So how do you work around this? One way is to replace the % character with %25 as % has the acsii hex code 25, so 115%2510.ai will be converted to 115%10.ai.
interisting that when displayed in a message box it showed the 115%11.ai as is.
i Really need to improve my vb.
im starting to play with vb.net so that should help.