well it looks like you have a couple of issues, first reading the $path comment
+$("$") this section portion looks wrong, you are trying to call a variable $
that should result in a path of \file01\samaccountname$
(thats what it appears you are trying to set based upon my reading)
Secondly, per the TechNet for set-aduser for HomeDrive:
Specifies a drive that is associated with the UNC path defined by the HomeDirectory property. The drive letter is specified as “:” where indicates the letter of the drive to associate. The must be a single, uppercase letter and the colon is required. This parameter sets the HomeDrive property of the user object. The LDAP Display Name (ldapDisplayName) for this property is “homeDrive”.
you need to change -HomeDrive $path to not use the Path variable, you need to provide a drive letter here