Jump to content

Sharing Folders via Command Line


HorseloverFat

Recommended Posts

Hi, I just have a quick question that hopefully someone can help me out with...

Using the NET SHARE command, is it possible to share a folder on the network AND share all subfolders within that folder too?

For example...

When I type

net share name=C:\Shared Folder\

it typically shares the folder "Shared Folder" but it wouldn't share "Shared Folder\Subfolder".

Is there some option for the NET SHARE command that would make it share subfolders too, or is there an alternate way of doing this via the command line?

Thanks!

Link to comment
Share on other sites


net share will share folder and subfolders too. If you can browse subfolders check NTFS permissions.

net share will allow "write" of shared folder, double check NTFS permissions if you want to keep read only.

For info "cacls" can set NTFS permissions in command line.

Link to comment
Share on other sites

Hmm, I could have sword that NET SHARE wasn't allowing access to the subfolders... When I share a drive or folder the "typical" way (right-clicking and choosing Sharing and Security) it takes a bit of time, saying "Setting Folder Permissions" but NET SHARE applies the share settings immediately, which lead me to think that it was just applying the settings to the root folder. Also, the "typical" method works fine and provides access to everything within the folder. Does sharing with that method change the NTFS permissions automatically or something?

I will look into that permissions command that you mentioned though, thank you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...