Is it possible to change the extension for all .txt files in a folder without selecting them manually?
in folder:
...\Test\fileA.txt
...\Test\file new.txt
...\Test\another file.txt
by code in
...\Test\fileA.rtf
...\Test\file new.rtf
...\Test\another file.rtf
?
change extension without previously selected files
-
highend
- Posts: 14925
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: change extension without previously selected files
As long as you're in the same path:
Code: Select all
$srcExt = "txt";
$dstExt = "rtf";
rename "e", $dstExt, , listfolder(, "*.$srcExt", 1), 64;
One of my scripts helped you out? Please donate via Paypal
-
atisoro
- Posts: 29
- Joined: 27 Jan 2025 16:27
Re: change extension without previously selected files
highend: brilliant, like always.
I couldn't finish them.

I couldn't finish them.
XYplorer Beta Club