I need to share a folder via cmd for use in a batch file hence the %computername% part. The file is %computername%-scan and is located in the root of c drive and will be shared with a share name of %computername% where %computername% is the pc's hostname to a local user which i used in administrator mode.
net share %computername%=c:\"%computername%-scan" /GRANT:scan,CHANGE
I used the above command to share it but it is not successful. However, if i remove the -scan from the filename and the command with the quote marks,the sharing works. Is there a special option for sharing a folder with symbols and characters?