<get SelectedItemsPathNames>
What does that return?
All items separated by
<crlf>
!Does the current
foreach
loop over <crlf>
-separated files? Nope^^$name = gettoken($file, -1, "\\");
Since when is "\\" a valid separator in Windows paths?
Apart from that, getting
$name
and $ext
can be simplified by using getpathcomponent() / alias: gpc()
renameitem($file, $newName, "c");
Wrong order of arguments & what the heck should the "c" stand for?
Use
step;
/ unstep;
to check if things really do what they should...and again: Scripting doesn't work if you don't consult the help file^^
Code: Select all
load "C:\\Users\\damie\\AppData\\Roaming\\XYplorer\\Scripts\\Replace dot with space.xys";
Regarding that path, quoted from the help file:
So a simple (if the script content were correct)If the given filename does not contain an extension, XY will automatically add .XYS as its extension ("XYplorer Scriptfile"). So, to load the file MyScript.xys located in the application data folder, all you need to specify as parameter is MyScript: load "MyScript"
load "Replace dot with space";
would have worked...