Follow these steps to recover files from USB flash drive using CMD attrib: Step 1. Right-click Windows icon and type cmd in the search bar. Step 2. Select to run Command Prompt as Administrator. Sign in with your administrator account if necessary. Step 3. Type attrib command lines and hit Enter.