1 (edited by amarnl 2016-08-10 19:42:35)

Topic: How to change Symbols "\" in %Xso (remove \)?

I want to Change file.jpg

%Xdo_[%Xmk][%Xmo][%Xso][%Xiw_X_%Xih][%nc{1,1}].%yd

%Xso = "Facebook for iPhone\iPad"

File became like iPad][3264_X_2448][1].jpg

How to remove the \ from %Xso

did change replacement in prefs. no luck and also in %Xso("\", "_") not working

M using v3.14

Re: How to change Symbols "\" in %Xso (remove \)?

Welcome to this forum,

What you do is correct except for one detail : the backslash is a special character (See help : Expression/Advanced features/Escape character) : it makes loose the following character its special meaning, if any. This is generally called "escaping".
In "%Xso("\", "_")", the backslash ('\') escapes the following '"'. To be interpreted as a standard character, '\' has to loose its special status and therefore must be preceded by another '\' : it has to be doubled.
To get what you need just use : "%Xso("\\", "_")"

Maybe the help should be clearer about this point.