Page 1 of 1

Trouble with moving files and <curfolder>

Posted: 30 May 2018 02:06
by Randalll
Hello, I am a beginner to Xyplorer scripting, but I am having trouble with a script, not sure what I'm doing wrong. :oops:

It's meant to move the selected file(s) into an archival folder, with the subfolder being the current folder's name.

eg. if I'm in D:\Downloads\Photos, it should move the file(s) into Z:\Archive\Photos. I am trying to achieve this with the following code:

Code: Select all

moveto "Z:\Archive\<curfolder>", , -1;
However, when I try to do this, it's sending the file to Z:\Archive\D\Downloads\Photos instead. In the PDF Help, it says that the behaviour of <curpath> should be:

Code: Select all

<curfolder> name of the current folder (without path)
I am on XYplorer 19.0, if that makes any difference.

Thank you for any help or advice.

Re: Trouble with moving files and <curfolder>

Posted: 30 May 2018 02:30
by jupe
It looks like it could be because the -1 is in the wrong spot, I assume that is meant to be for the on_collision ask setting?

moveto [location], [source], [rootpath], [flags], [autorichop], [on_collision],[preserve_dates], [create_log], [pop_stats], [skip_junctions], [verify], [show_progress]

Try this:

Code: Select all

moveto "Z:\Archive\<curfolder>", , , , , -1;

Re: Trouble with moving files and <curfolder>

Posted: 30 May 2018 02:57
by Randalll
Thank you so much, that worked!

Yes, it is just as you said, I had the -1 there for collision checking.