Available space of "data folder" of client disk/drive

I want to have an analisys that will give me the free space of:

data folder of client as string

If that’s on /var or /var/opt, or C: or D:… what ever it is. I need to figure out how much space is used/available. We hit our head on an agent deploy on some old servers that have limited space and I don’t want that happening again.

How about:

free space of drive of data folder of client