Skip to main content

Posts

Showing posts from November, 2021

Rename files using power shell

I definitely miss Linux a lot. However, my main working environments are in Windows. It has been 5 years! Just had a call with one of the customers. I need to rename 100+ files. Sigh. During the call, I had time pressure, and I couldn't tolerate with continuous of try and error. So, I used the slowest and safest but human-error-proned way of doing it, rename it manually, one by one. We got silence moment in the call, then we suggested to communicate via email to sync up. Phew, pressure went away. So I did a quick Google search. I have tried to search for this solution for several times, but I never get it right, get it work. Probably I am still unconsciously resisting to PowerShell. Anyway, recently I seems to have more luck with PowerShell! Then, in a few minutes, I finally found the "ultimate" solution! Get-ChildItem *.txt | Rename-Item -NewName { $_.Name -replace 'a','b' } And then, suddenly I found out, I forgot how to do this in Linux... Sigh. ...

WSL - Window Subsystem for Linux

I am not sure how old is this feature available in Windows 10. Recently, I screened through Turn Window features on or off list again and found this. I got excited, and turn it on. I have to admit, this is the best solution for me as of now, which I cannot install Virtual Box on this laptop for whatever reason or policy. :P I did a search on Google and found this page Install WSL by Microsoft. But it says... You must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11. I checked my system, it is running at a lower version. :( Well, do you think it would stop me from continue? Of course not! If you have it available in the list, of course it should be ready to use! So I go ahead and enable it. Then, maybe I restarted laptop. In case you want to know how and where to enable it, follow these steps. 1. Open Control Panel 2. Click on "Programs" 3. Click on "Turn Window features on or off" 4. A dialog box pop up, scroll to the end...