Home > Uncategorized > how to create/share a directory over a SMB network, using the command line

how to create/share a directory over a SMB network, using the command line

@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

Advertisements
Categories: Uncategorized Tags: , , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: