Get-ChildItem -Path . -Recurse -File | Select-Object FullNameThis script performs a recursive search starting from the current directory (.), finds all files (excluding folders), and outputs their full paths.
Computer, Technology, Databases, Google, Internet, Mobile, Linux, Microsoft, Open Source, Security, Social Media, Web Development, Business, Finance
Friday, November 07, 2025
Recursively List All Files with PowerShell
If you are working with PowerShell and need a fast way to list all files in a directory, including those buried in subfolders, this one-liner will work:
Tuesday, October 14, 2025
PowerShell Tip: Bulk Appending File Extensions with One-Liner Magic
Ever found yourself staring at a folder full of files and wishing you could batch append them all with a .txt suffix? PowerShell makes this delightfully simple with a one-liner:
Get-ChildItem -File | Rename-Item -NewName {$_.Name + '.txt'}
To expand further to include files in all sub folders, use below instead.
Get-ChildItem -File -Recurse | Rename-Item -NewName { $_.Name + '.txt' }
If you wish to rollback what you just did, use the following:
Get-ChildItem -Path . -Recurse -File -Filter "*.txt" | ForEach-Object {
$newName = [System.IO.Path]::GetFileNameWithoutExtension($_.Name)
Rename-Item -Path $_.FullName -NewName $newName
}
Feel free to replace the txt with a different one based on your needs!
Sunday, March 02, 2025
LTA's Official MRT Map Feb 2025 - With Hume Station
Singapore's Land Transport Authority has just released an updated official MRT map including one additional station on the Downtown Line i.e. Hume Station.
Wednesday, January 08, 2025
Copy directories recursively from source to destination
Robocopy, short for "Robust File Copy" is an advanced command-line utility included in Windows. It's designed to copy files and directories with more features and control than the basic copy commands. If you need to efficiently and reliably replicate a large number of files and folders, Robocopy is your go-to tool.
robocopy source dest /s /e
Subscribe to:
Comments (Atom)
Popular Posts
-
新加坡人口400万,亚洲人口4亿,全世界人口6亿。 但是,我一人可能就很有可能是世界最傻的了。我真是个不折不扣的大木头。真是受不了自己。
-
If you are working with PowerShell and need a fast way to list all files in a directory, including those buried in subfolders, this one-line...
-
I was at Bugis Junction today and saw 蘇打綠 (Soda Green) performing. They look so much different especially the lead singer. I find their song...
-
*********** Try to sleep now, close your eyes Soon the birds would stop singing Twinkling stars, are shining bright They'll be watch...
-
I would like to apologize that sigining of my guestbook is not possible at the moment due to an unexpected bug. There is already 74 entries ...
