View Full Version : Can't redirect output of NET SHARE THIS_SHARE=X:\SOME_FOLDER to a file


Frank B Denman
04-24-2006, 02:49 AM
Hi Folks,

I suspect I'm overlooking something obvious.

This works:
NET SHARE>Shares.txt

But this produces an empty 0KB file:
NET SHARE THIS_SHARE=X:\SOME_FOLDER>Share_Output.txt

Any help much appreciated

Frank
Frank Denman
Denman Systems
news@denmansystemsx.com
[and please remove the x fom the domainname]
Please delete the "x" from my email address.

foxidrive
04-24-2006, 08:34 AM
On Sun, 23 Apr 2006 18:49:30 -0700, Frank B Denman wrote:

> Hi Folks,
>
> I suspect I'm overlooking something obvious.
>
> This works:
> NET SHARE>Shares.txt
>
> But this produces an empty 0KB file:
> NET SHARE THIS_SHARE=X:\SOME_FOLDER>Share_Output.txt
>
> Any help much appreciated

net share d=d:\ >file.txt 2>&1

Ed Siff
04-26-2006, 08:13 PM
Frank B Denman wrote:

> Hi Folks,
>
> I suspect I'm overlooking something obvious.
>
> This works:
> NET SHARE>Shares.txt
>
> But this produces an empty 0KB file:
> NET SHARE THIS_SHARE=X:\SOME_FOLDER>Share_Output.txt
>
> Any help much appreciated

Maybe the share command is not working? I get an empty file and "System
error 2 has occurred, The system cannot find the file specified" error if
I try to share a non-existent folder.

Ed

Frank B Denman
04-28-2006, 10:56 PM
Thanks!

Just what I needed!

Now, back to command reference to see why.....

Cheers,

Frank

On Mon, 24 Apr 2006 17:34:12 +1000, foxidrive <woohoo@gotcha.invalid> wrote:

>On Sun, 23 Apr 2006 18:49:30 -0700, Frank B Denman wrote:
>
>> Hi Folks,
>>
>> I suspect I'm overlooking something obvious.
>>
>> This works:
>> NET SHARE>Shares.txt
>>
>> But this produces an empty 0KB file:
>> NET SHARE THIS_SHARE=X:\SOME_FOLDER>Share_Output.txt
>>
>> Any help much appreciated
>
>net share d=d:\ >file.txt 2>&1

Frank Denman
Denman Systems
news@denmansystemsx.com
[and please remove the x fom the domainname]
Please delete the "x" from my email address.

Dean Wells [MVP]
04-28-2006, 11:11 PM
I'd hazard a guess that "X:\SOME_FOLDER" doesn't exist as local media.

--
Dean Wells [MVP / Directory Services]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l

Frank B Denman wrote:
> Thanks!
>
> Just what I needed!
>
> Now, back to command reference to see why.....
>
> Cheers,
>
> Frank
>
> On Mon, 24 Apr 2006 17:34:12 +1000, foxidrive <woohoo@gotcha.invalid>
> wrote:
>
>> On Sun, 23 Apr 2006 18:49:30 -0700, Frank B Denman wrote:
>>
>>> Hi Folks,
>>>
>>> I suspect I'm overlooking something obvious.
>>>
>>> This works:
>>> NET SHARE>Shares.txt
>>>
>>> But this produces an empty 0KB file:
>>> NET SHARE THIS_SHARE=X:\SOME_FOLDER>Share_Output.txt
>>>
>>> Any help much appreciated
>>
>> net share d=d:\ >file.txt 2>&1
>
> Frank Denman
> Denman Systems
> news@denmansystemsx.com
> [and please remove the x fom the domainname]
> Please delete the "x" from my email address.