I wanted to recover a previous version of a file on an external USB
flash drive. I searched about it and found a method by using "chkdsk
The CHKDSK command is for checking your disks. It doesn't have anything to do with previous versions of files.
I opened command prompt and typed in "chkdsk X: /f".
That command would check your X: drive (if you have one, presumably that's your USB drive?). The
/f parameter tells it to also fix any errors found.
It said that is was formatted in FAT32 and then said that Windows
can't use it because it already is being used by another process
(Nothing from the flash drive was opened). It asked if I wanted to
dismount it and I put no and then asked if I wanted it to do that
later and I put no.
That's normal behaviour for CHKDSK if the drive is in use (and it seems it was in use for whatever reason). In view of your answering no to both questions, CHKDSK will not have made any changes to your X: drive.
Afterward I checked the flash drive and now there is new folders named
Temporary Files and Trashes.
Since CHKDSK will not have changed your X: drive, these folders will not have anything to do with running CHKDSK that time.
I deleted them and found out most of the documents now have "._" in
the beginning of their names. When I try opening them, they are filled
with random symbols and characters.
It appears that unfortunately your USB drive is damaged or at least the data has become corrupted. You may be able to fix it by running the same CHKDSK command and answering yes this time. But please check which drive leter is assigned to your USB drive at that time, so that you know whether X: is the right drive letter to use in the CHKDSK command.
How do I revert the flash drive back to the stage it was before I used
"chkdsk X: /f"?
You cannot revert a drive to its previous state after having CHKDSK fix it. However, in this case you did not let CHKDSK make any changes so you'll see that it's not really relevant at this point.