You cannot do this in the way you describe. Which variable is dependent is a matter for you to figure out from substantive knowledge.
Suppose you had a data set that consisted of height, weight and age of a bunch of adult humans. Which is the dependent variable? There's no way to know from just the numbers. Given what we know about humans, we can say weight is dependent on height and age. But the data don't tell us that and you could run a regression with any of these as the DV.
Or, if you had an experiment, then you would have to know which variables were manipulated by the experimenter. Suppose you had a randomized controlled trial in which some people got a medication and others did not and there was a variable for symptom severity and a bunch of other variables. Well, YOU know that the medication was manipulated. But the computer won't know unless you tell it.
EDIT: It reminds me of something I read (I think it was by Douglas Hofstadter but I am not sure and can't find it):
Computers are logical but not reasonable and people are reasonable but not logical.