error on script moveto

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
swan_x
Posts: 335
Joined: 08 Oct 2009 12:27

error on script moveto

Post by swan_x »

i have this simple script:

Code: Select all

delete 0,0, "D:\000\egosum\*.*"; moveto "D:\000\egosum\", "C:\alterkero\";
but this copy only all files to egosum folder, not also subfolder (on C:\alterkero\ i have some files and some folders)

so, i have try:

Code: Select all

delete 0,0, "D:\000\egosum\*.*"; moveto "D:\000\egosum\", "C:\alterkero\*.*";
but without result. all subfolder they are not moved, but only the files.
where is the mistake?

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: error on script moveto

Post by highend »

Not "*.*" but "*"
One of my scripts helped you out? Please donate via Paypal

swan_x
Posts: 335
Joined: 08 Oct 2009 12:27

Re: error on script moveto

Post by swan_x »

tanxs for your reply.

but today i don't find my post and i have write the same post again...

next time you (or who did it) move a post at least notified via PM ....

swan_x
Posts: 335
Joined: 08 Oct 2009 12:27

Re: error on script moveto

Post by swan_x »

ok. now on destination folder (egosum), on one specific folder (qtm folder) i want delete all files on yhis folder except 2 files...

Code: Select all

delete 0,0, ""D:\000\egosum\qtm\*.*";";
but how to exclude 2 files from this specific folder?

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: error on script moveto

Post by highend »

on one specific folder (qtm folder) i want delete all files on yhis folder except 2 files...

Code: Select all

delete 1, 0, formatlist(listfolder("D:\000\egosum\qtm\", , 1), "F", , "!<file 1 without path>|<file 2 without path>", "f");
One of my scripts helped you out? Please donate via Paypal

swan_x
Posts: 335
Joined: 08 Oct 2009 12:27

Re: error on script moveto

Post by swan_x »

not work.

Code: Select all

delete 1, 0, formatlist(listfolder("D:\000\ergosum\qm\", , 1), "F", , "!<file1>|<file2>", "f");
specified path could not be found

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: error on script moveto

Post by highend »

Maybe double check that you're using the correct folder, then?

All examples used "egosum" and your last one is "ergosum" instead...
One of my scripts helped you out? Please donate via Paypal

swan_x
Posts: 335
Joined: 08 Oct 2009 12:27

Re: error on script moveto

Post by swan_x »

right, on last post i have change name folder, but that's not the problem...
this is only an example. on my pc i have different folder name.
i have checked correct name on my pc, but problem is another....

also with this more simple command:

Code: Select all

delete 0,0, "D:\0011\4923\*.*"; moveto "D:\0011\4923", "C:\0000045\*"; delete 0, 0, "D:\0011\4923\file001.dat";
file file001.dat is not deleted....

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: error on script moveto

Post by highend »

setting "BackgroundFileOps", 0;
Use that as the first command...
One of my scripts helped you out? Please donate via Paypal

swan_x
Posts: 335
Joined: 08 Oct 2009 12:27

Re: error on script moveto

Post by swan_x »

wow! very nice. all work correctly.

many tanxs for your support. cheers!

swan_x
Posts: 335
Joined: 08 Oct 2009 12:27

Re: error on script moveto

Post by swan_x »

little problem. finally i have this script

Code: Select all

setting "BackgroundFileOps", 0; delete 0,0, "D:\000\33489234824666\*.*"; moveto "D:\000\33489234824666", "D:\000\28489234824923\*"; delete 0, 0, "D:\000\33489234824666\ring.wav|D:\000\33489234824666\unins000.dat|D:\000\33489234824666\unins000.msg|D:\000\33489234824666\unins000.exe"; delete 0, 0, formatlist(listfolder("D:\000\33489234824666\qm\", , 1), "F", , "!<qt_en.qm>|<ksa.en.qm>", "f");
this work correctly but at final on qm folder all files are deleted (no exception for qt_en.qm and ksa.en.qm files)....

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: error on script moveto

Post by highend »

Do you really think that <qt_en.qm>|<ksa.en.qm> are valid file names?
Hint: No^^
One of my scripts helped you out? Please donate via Paypal

swan_x
Posts: 335
Joined: 08 Oct 2009 12:27

Re: error on script moveto

Post by swan_x »

i have follow your suggestion:

Code: Select all

formatlist(listfolder("D:\000\egosum\qtm\", , 1), "F", , "!<file 1 without path>|<file 2 without path>", "f");
<file 1 without path>|<file 2 without path>"

where is my mistake?

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: error on script moveto

Post by highend »

Those were placeholders, not real file names or since when does Windows allow < or > in a file name?
One of my scripts helped you out? Please donate via Paypal

swan_x
Posts: 335
Joined: 08 Oct 2009 12:27

Re: error on script moveto

Post by swan_x »

ah, yes. understand. now work. tanxs again ;)

Post Reply