I have this file that I downloaded and I want to test it before I open it, to see if it is a virus.
right click on it, and use your antiviruses scanning option in the menu.
I was thinking more along the lines of testing it on a "virtual" os, or something, so it doesn't actually affect the OS installed but a fake one.
why would you want to?
If your AV detects a virus when you scan it, then either delete it, or ask us if you think it's a false positive. If not, assuming your av is set to scan within archives, then it should be ok. Unless of course you want to shell out I don't know how much money on something like VMWare, which is a worthy if expensive program, for the sake of something pointless.