Solved

Buffalo Terastaion 3400 PC's can see the XLS file but Mac's can't

Posted on 2016-08-12
4
31 Views
Last Modified: 2016-09-12
I set this NAS up about a year ago and everything worked great until a few months ago when users no longer got prompted that the file was open and they could only open it as read-only. Now they can open the file in normal read-write mode but if someone else is working on it they can't save changes. I would like the file to lock if someone has it open.

Recently, this file became invisible to the Mac users except one who had admin rights on the NAS and only the PC's users can access it. The Read-Write issue still exists. I am stumped.

Summary:
1. Need to have read-only on the xlsx file when another user has it opened.
2. Need to have the file visible to Mac users.

Thanks,
Chris
0
Comment
Question by:cj1301
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 18

Accepted Solution

by:
xtermie earned 500 total points (awarded by participants)
ID: 41765140
Here is a macro that will make all files in your shared path read only
Sub ReadOnly2)
    Dim sPath As String
   sPath = "c:\temp\"
    Call setFileReadOnly(sPath)
End Sub

Sub setFileReadOnly(sPath As String)
    Dim sFile As String
    Dim sSubFolder As String
    Dim fsoObject As Scripting.FileSystemObject
    Dim folderObject As Scripting.Folder
    Dim fileObject As Scripting.File

    Set fsoObject = New Scripting.FileSystemObject

    For Each folderObject In fsoObject.GetFolder(sPath).SubFolders
        Debug.Print folderObject.Path
        Call setFileReadOnly(folderObject.Path & "\")
    Next folderObject

    For Each fileObject In fsoObject.GetFolder(sPath).Files
        Debug.Print sPath & fileObject.Name
        SetAttr sPath & fileObject.Name, vbReadOnly
    Next fileObject
End Sub

Open in new window

0
 
LVL 18

Assisted Solution

by:xtermie
xtermie earned 500 total points (awarded by participants)
ID: 41765144
or something like this
Sub SetFilesReadOnly(Optional location As Folder)
    Dim fso As Scripting.FileSystemObject
    Set fso = New Scripting.FileSystemObject

    If location Is Nothing Then
        Set location = fso.GetFolder("C:\Temp")
    End If

    Dim target As File
    For Each target In location.Files
        if instr(target.Filename, ".xls") > 0 then
        target.Attributes = target.Attributes + ReadOnly
        end if
    Next target

    Dim directory As Folder
    For Each directory In location.SubFolders
        SetFilesReadOnly directory
    Next directory
End Sub

Open in new window


You'll should add reference to Microsoft Scripting Runtime
0
 

Author Comment

by:cj1301
ID: 41767788
Do I run this as a script on the NAS? There is no Windows fileserver and most of the local machines are Mac's.
0
 
LVL 18

Expert Comment

by:xtermie
ID: 41793889
Good comment and suggestions provided
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question