in reply to Quickest way to get a list of all folders in a directory

Use single quotes instead of double quotes ('\\pcname-vm\c$\\program files\adobe'). Note that '\\' produces just a single backslash, so you might need '\\\\'.