Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

replace all \ with \\

replace all \ with \\

Anonymous
Not applicable
285 Views
2 Replies
Message 1 of 3

replace all \ with \\

Anonymous
Not applicable
how to replace \ with \\ in 3dsmax script. python equivalent is replace command


"D:\zarawintercollection\max2011\scenes\sh03\minor\"

should be

"D:\\zarawintercollection\\max2011\\scenes\\sh03\\minor\\"


Thank you
0 Likes
286 Views
2 Replies
Replies (2)
Message 2 of 3

Steve_Curley
Mentor
Mentor
You would be better off replacing them with a single forward slash. Much easier to do - almost any search&replace will do it - plus it's much less confusing, especially if you're adding strings together to create the full pathname. The \ is an escape character and needs (in some circumstances) to be doubled so you end up with a crazy number of them.


Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 3 of 3

Anonymous
Not applicable
for a hard coded string you don't need to replace anything use the @
to ignore the literals
myStr = @"D:\zarawintercollection\max2011\scenes\sh03\minor\"
0 Likes