Return file list for specific file type from select items?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
qwerty
Posts: 62
Joined: 03 Apr 2018 15:59

Return file list for specific file type from select items?

Post by qwerty »

solved
Last edited by qwerty on 19 Mar 2021 16:20, edited 1 time in total.
2) Windows Version: Windows 11 Enterprise 26200.8037
3) Screen Scaling Percentage: 150%

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

Re: Return file list for specific file type from select items?

Post by highend »

Use formatlist() after quicksearch(), listfolder(), listpane(), report(), whatever...
One of my scripts helped you out? Please donate via Paypal

qwerty
Posts: 62
Joined: 03 Apr 2018 15:59

Re: Return file list for specific file type from select items?

Post by qwerty »

solved
Last edited by qwerty on 19 Mar 2021 16:22, edited 1 time in total.
2) Windows Version: Windows 11 Enterprise 26200.8037
3) Screen Scaling Percentage: 150%

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

Re: Return file list for specific file type from select items?

Post by highend »

Oh, overread "selected"...

Regardless of that:

Code: Select all

    $sel    = <get SelectedItemsPathNames <crlf>>;
    $pdf    = formatlist($sel, "f", <crlf>, "*.pdf", "f");
    $nonPdf = formatlist($sel, "f", <crlf>, "!*.pdf", "f");
One of my scripts helped you out? Please donate via Paypal

qwerty
Posts: 62
Joined: 03 Apr 2018 15:59

Re: Return file list for specific file type from select items?

Post by qwerty »

solved
Last edited by qwerty on 19 Mar 2021 16:22, edited 1 time in total.
2) Windows Version: Windows 11 Enterprise 26200.8037
3) Screen Scaling Percentage: 150%

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

Re: Return file list for specific file type from select items?

Post by highend »

Because your separator is wrong^^
One of my scripts helped you out? Please donate via Paypal

qwerty
Posts: 62
Joined: 03 Apr 2018 15:59

Re: Return file list for specific file type from select items?

Post by qwerty »

solved
Last edited by qwerty on 19 Mar 2021 16:22, edited 1 time in total.
2) Windows Version: Windows 11 Enterprise 26200.8037
3) Screen Scaling Percentage: 150%

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

Re: Return file list for specific file type from select items?

Post by highend »

The one that <get SelectedItemsPathNames <crlf>> uses?
One of my scripts helped you out? Please donate via Paypal

qwerty
Posts: 62
Joined: 03 Apr 2018 15:59

Re: Return file list for specific file type from select items?

Post by qwerty »

solved
Last edited by qwerty on 19 Mar 2021 16:21, edited 1 time in total.
2) Windows Version: Windows 11 Enterprise 26200.8037
3) Screen Scaling Percentage: 150%

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

Re: Return file list for specific file type from select items?

Post by highend »

*cry*

Code: Select all

    $sel    = <get SelectedItemsPathNames <crlf>>;
    $pdf    = formatlist($sel, "f", <crlf>, "*.pdf<crlf>*.txt", "f");

    $sel    = <get SelectedItemsPathNames |>;
    $pdf    = formatlist($sel, "f", , "*.pdf|*.txt", "f");
One of my scripts helped you out? Please donate via Paypal

qwerty
Posts: 62
Joined: 03 Apr 2018 15:59

Re: Return file list for specific file type from select items?

Post by qwerty »

solved
Last edited by qwerty on 19 Mar 2021 16:21, edited 2 times in total.
2) Windows Version: Windows 11 Enterprise 26200.8037
3) Screen Scaling Percentage: 150%

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

Re: Return file list for specific file type from select items?

Post by highend »

$pdf = formatlist($sel, "f", <crlf>, "*.pdf<crlf>*.txt", "f");^^
One of my scripts helped you out? Please donate via Paypal

qwerty
Posts: 62
Joined: 03 Apr 2018 15:59

Re: Return file list for specific file type from select items?

Post by qwerty »

Thank you so much! :appl:
2) Windows Version: Windows 11 Enterprise 26200.8037
3) Screen Scaling Percentage: 150%

Post Reply