Quantcast
Channel: File Services and Storage forum
Viewing all articles
Browse latest Browse all 13565

Sharing a folder with hyphens

$
0
0

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?


Viewing all articles
Browse latest Browse all 13565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>