Trouble with moving files and <curfolder>

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Randalll
Posts: 2
Joined: 30 May 2018 01:48

Trouble with moving files and <curfolder>

Post 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.

jupe
Posts: 3569
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Trouble with moving files and <curfolder>

Post 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;

Randalll
Posts: 2
Joined: 30 May 2018 01:48

Re: Trouble with moving files and <curfolder>

Post by Randalll »

Thank you so much, that worked!

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

Post Reply