Moving Multiple files to different subfolders

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Sahilbakshi
Posts: 7
Joined: 04 May 2019 14:59

Re: Moving Multiple files to different subfolders

Post by Sahilbakshi »

highend wrote: 10 Dec 2024 07:59 In the same folder, execute this from the address bar and show the result:
text listfolder(, , 1);
-----------------------------
It opens a box with text:-
"D:\New folder (2)\1.txt|D:\New folder (2)\2.txt|D:\New folder (2)\3.txt|D:\New folder (2)\4.txt|D:\New folder (2)\5.txt|D:\New folder (2)\6.txt|D:\New folder (2)\7.txt|D:\New folder (2)\s.txt"

And gives two options- copy and close

Regards-
Sahil

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

Re: Moving Multiple files to different subfolders

Post by highend »

Can't reproduce that
Animation.gif
Animation.gif (119.8 KiB) Viewed 1112 times
One of my scripts helped you out? Please donate via Paypal

Sahilbakshi
Posts: 7
Joined: 04 May 2019 14:59

Re: Moving Multiple files to different subfolders

Post by Sahilbakshi »

highend wrote: 10 Dec 2024 08:25 Can't reproduce that

Animation.gif
-----------------------------------
Dear Sir,
I'm running the same code but getting errors. Is it has to do with the version of XYplorer I'm using?
By the way, I'm using 14.80.0200 pro.

It doesn't matter whether I succeed in this or not, what matters is you spent your time on an unknown person me. I never expected I would get response in minutes. Accept my gratitude, Sir. :)

Regards,
Sahil
Attachments
Error.gif
Error.gif (1.13 MiB) Viewed 1110 times

WirlyWirly
Posts: 263
Joined: 21 Oct 2020 23:33
Location: Win 10 @ 100% (3440x1440)

Re: Moving Multiple files to different subfolders

Post by WirlyWirly »

I do this all the time by simply selecting the files and using the Batch Rename tool (File > Rename) with *\* as the wildcard.
2024-12-10_00-01-31.png
2024-12-10_00-01-31.png (34.94 KiB) Viewed 1096 times

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

Re: Moving Multiple files to different subfolders

Post by highend »

This will work on v14.x...

Code: Select all

    foreach($file, listfolder(, , 1), "|", "e") {
        moveto getpathcomponent($file, "base"), $file, , 2, 2;
    }
One of my scripts helped you out? Please donate via Paypal

Sahilbakshi
Posts: 7
Joined: 04 May 2019 14:59

Re: Moving Multiple files to different subfolders

Post by Sahilbakshi »

highend wrote: 10 Dec 2024 09:12 This will work on v14.x...

Code: Select all

    foreach($file, listfolder(, , 1), "|", "e") {
        moveto getpathcomponent($file, "base"), $file, , 2, 2;
    }
-------------------------------
This one worked perfectly. Thank you, Sir, for your time, efforts and patience. Highly appreciated. I'm grateful. :)

Regards and Thanks,
Sahil
India.

Sahilbakshi
Posts: 7
Joined: 04 May 2019 14:59

Re: Moving Multiple files to different subfolders

Post by Sahilbakshi »

WirlyWirly wrote: 10 Dec 2024 09:02 I do this all the time by simply selecting the files and using the Batch Rename tool (File > Rename) with *\* as the wildcard.

2024-12-10_00-01-31.png
-----------------------
I don't know what you said but thanks anyway for your time and efforts.

Regards & Thanks,
Sahil. :)

Post Reply