Archive
Posts Tagged ‘windows’
how to create/share a directory over a SMB network, using the command line
14 October 2008
Leave a comment
@echo off
if x%1x==xx goto usage
if +%2+ == ++ goto usage
if +%1+ == +/?+ goto usage
if +%1+ == +?+ goto usage
:command
md %1
net share %2=%1 /grant:Everyone,FULL
CACLS %1 /E /G Everyone:F
goto end
:usage
echo salut mon gars, ce script va creer le dossier que tu passe comme premier paramètre
echo et le partage sur le reseau (pour Everyone) avec le nom que t'as passé comme deuxième paramètre.
echo exemple:
echo cescript.bat c:\totocaca totocacapartage
:end
Categories: Uncategorized
command line, dos, share, smb, windows