Wednesday, October 7, 2020

How to Search and Delete with Command Prompt

Open Command Prompt as Admin, run (to delete anything that starts with filename):

for /f "delims=" %i in ('dir /s /b /ad filename*') do rd /s/q "%i"

How to Delete System Restore Points in Windows 10

 

To Delete All or Specific System Restore Points in Command Prompt


1 Open an elevated command prompt.

2 Copy and paste the vssadmin list shadows command into the elevated command prompt, and press Enter.

This will list all shadow copies (restore points) on all drives. You will see the volume drive letter and shadow copy ID number for each one. You will need this information for the steps below.

Delete System Restore Points in Windows 10-vssadmin_list_shadows.png

3 Do step 4 (all), step 5 (all on drive), step 6 (oldest on drive), or step 7 (shadow copy ID) below for how you would like to delete restore points.


 4. To Delete All Restore Points on All Drives

A) Copy and paste the command below you want to use into the elevated command prompt, press Enter, and go to step 8 below. (see screenshot below)

(Prompts Y/N to confirm before deleting)
vssadmin delete shadows /all

OR

(Delete without prompting)
vssadmin delete shadows /all /quiet

Delete System Restore Points in Windows 10-vssadmin_delete_shadows-4.png


 5. To Delete All Restore Points on Specific Drive

A) Type the command below you want to use in the elevated command prompt, press Enter, and go to step 8 below. (see screenshots below)

(Prompts Y/N to confirm before deleting)
vssadmin delete shadows /For=(drive letter): /all

OR

(Delete without prompting)
vssadmin delete shadows /For=(drive letter): /all /quiet

Substitute (drive letter) in the commands above with the drive letter you want. This will be listed as Original Volume: (x: ) from step 2 above.

For example:

vssadmin delete shadows /For=C: /all

OR

vssadmin delete shadows /For=C: /all /quiet

Delete System Restore Points in Windows 10-vssadmin_delete_shadows-1.png
Delete System Restore Points in Windows 10-vssadmin_delete_shadows-2.png


 6. To Delete Oldest Restore Point on Specific Drive

A) Type the command below you want to use into the elevated command prompt, press Enter, and go to step 8 below. (see screenshots below)

(Prompts Y/N to confirm before deleting)
vssadmin delete shadows /For=(drive letter): /oldest

OR

(Delete without prompting)
vssadmin delete shadows /For=(drive letter): /oldest /quiet

Substitute (drive letter) in the commands above with the drive letter you want. This will be listed as Original Volume: (x: ) from step 2 above.

For example:

vssadmin delete shadows /For=C: /oldest

OR

vssadmin delete shadows /For=C: /oldest /quiet

Delete System Restore Points in Windows 10-vssadmin_delete_shadows-5.png


 7. To Delete Specific Restore Point using Shadow Copy ID

A) Type the command below into the elevated command prompt, press Enter, and go to step 8 below. (see screenshot below)

vssadmin delete shadows /Shadow={Shadow Copy ID}

Substitute Shadow Copy ID in the commands above with the actual Shadow Copy ID number of the restore point you want to delete from step 2 above.

For example: vssadmin delete shadows /Shadow={3e351030-9ebd-428c-9ff3-86dca40a7f96}

Delete System Restore Points in Windows 10-vssadmin_delete_shadows-3.png


8 When finished, you can close the elevated command prompt if you like.

Friday, April 17, 2020

Sublime text 3 and Python 3 build on MacOS

By default, Sublime text uses python command to build a python code and MacOS ships with python 2.7. If you want to use python 3 with sublime text build, first install desired Python 3 package.
To build Python 3 on Sublime text go to Tools-> Build System -> New Build System
Paste the following command:
{
    "shell_cmd": "/usr/bin/env python3 ${file}",
    "selector": "source.python",
    "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
    "working_dir": "${file_path}"
}
then save as Python3.sublime-build into /Users//Library/Application Support/Sublime Text 3/Packages/User


then open a new file and add the following lines to test python version.
import sys
print (sys.version)
Choose Python 3 build and Ctrl+B


You should see in the bottom of the Sublime text
3.6.3 (v3.6.3:2c5fed86e0, Oct  3 2017, 00:32:08) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
[Finished in 0.4s]

Tuesday, April 14, 2020

Disable Reopening Windows When Logging Back In Mac OS X Completely

File to be Modified:

~/Library/Preferences/ByHost/com.apple.loginwindow.*


- STEPS-


1. Converting The plist Binary File to XML

plutil -convert xml1 ~/Library/Preferences/ByHost/com.apple.loginwindow.*

2. Edit the plist File

Delete Everything Under: TALAppsToRelaunchAtLogin , you should have only <array></array>

3. Converting The plist XML File to Binary

plutil -convert binary1 ~/Library/Preferences/ByHost/com.apple.loginwindow.*

Change The plist File Permission

chflags uchg com.apple.loginwindow.*.plist