Notifications
Clear all

[Closed] File merging and network paths?

Hello everybody,

again I have a question which is killing me as a MaxScript Newbie, though it should be quite simple to fix.

I´d like to merge objects from a Max file into another, already opened Max File.

Basically this should do the trick, right?

mergemaxfile "C:\myproject\mergefile.max" #("Box01")

However this doesn´t seem to work for a network path:

mergemaxfile "\\my_server\myproject\mergefile.max" #("Box01")

This causes me some headache. While I´d be able to work around the problem by creating a network shortcut and using this

mergemaxfile "Z:\myproject\mergefile.max" #("Box01")

I doubt this to be the clean way, as a not proper set network path would mean the script is useless.

Any ideas on this one? I tried using the @sign trick (Thanks to Kameleon for this one ;)) but that didn´t work as well.

mergemaxfile @"\\my_server\myproject\mergefile.max" #("Box01")

Any ideas or nudges in the right direction are much appreciated

Chris

4 Replies

Hi again, I just tried this option mergemaxfile @”\my_server\myproject\mergefile.max” #(“Box01”) and it worked, what’s the output on your listener? true or false? Maybe the problem is elsewhere. Cheers!

The problem, as I see, is most likely related to the way maxscript is treating your backslashes. These are also treated as “escape” characters…

So
is a newline, is a tab, \ is “”…

thus;

mergemaxfile "\\my_server\myproject\mergefile.max" #("Box01")

is been translated to something like

mergemaxfile "\my_server\myproject\mergefile.max" #("Box01")

which is not what you want…I would personally use

mergemaxfile "\\\\my_server\\myproject\\mergefile.max" #("Box01")

just to be on the save side…

Note, that this could be overkill, but it does seem to work for me…

Shane

Hi Kameleon and RustyKnight,

yes, it works right now with @”\myserver\myproject”. I feel a bit ashamed , as I misspelt the path, ooops(Was a bit of a stressy day, with request from my supervisor dropping right, left and front), should have paid attention and took my time. :banghead:

Anyway, thanks to your feedback, as that put out of my confusion, and back on track.

Have a nice day you two, and cheers from Germany.

Chris

Ah, crunch time, turns even the best of us into babbling idiots…