Often, we need to clean up files and folders that are older than x number of days before they eat up all the disk space. So we need a script/command to delete the old files/folder.
1: @echo off
2: :: set folder path
3: set target_path=C:\Users\xxxx\AppData\Local\Temp
5: :: set min age of files and folders to delete
6: set max_days=7
8: :: remove files from %target_path%
9: forfiles -p %target_path% -m *.* -d -%max_days% -c "cmd /c del /q @path"
11: :: remove sub directories from %dump_path%
12: forfiles -p %target_path% -d -%max_days% -c "cmd /c IF @isdir == TRUE rd /S /Q @path"
If you want to do a clean install of Windows 10 Professional edition on your Yoga 910, you need to be aware of a few things. In my case, I am using an iso image from MSDN.
- I use Rufus to create a bootable USB flash drive with the Windows 10 Professional iso image.
- I used MBR partition schem for UEFI
- I picked File system FAT32
- After the USB drive is ready, I created a txt file ei.cfg to USB drive “sources” folder. ei.cfg has the following content. This file allows to me to install Professional edition instead of the default choice of Home edition.
- I downloaded the storage driver. I need the driver to see the ssd drive. https://downloadcenter.intel.com/download/26361/Intel-Rapid-Storage-Technology-Intel-RST-RAID-Driver
- Download the xxxxx-x64.zip. Once unzipped, you should see the following files:
I copy these files to the USB drive root folder.
Note: Lenovo support site links to the SetupRST.exe version, which is not what we need.
Then press the tiny Novo button, go to boot menu, select the USB drive to boot.
During the Windows setup, I “Load driver” and choose the storage driver at the USB root folder.
Special thanks to Brad’s hacks guide for the tips. For me, the Media Creation Tool did not work. So I used Rufus with my own iso image.
If you create a recovery drive (e.g. USB), you should also put the storage drivers onto it. You won’t see the drive until you do a work around. You need to choose the option restore from a system image, which will allow you to load a driver. Pick iaStoreAC.inf. Then cancel, now you can recover using the recovery drive. In my case, it wiped everything. It did not have the installed windows update nor installed Office 2016.