Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2016-08-12
4
Medium Priority
?
44 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
  • 3
4 Comments
 
LVL 18

Accepted Solution

by:
xtermie earned 2000 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
This article outlines the struggles that Macs encounter in Windows-dominated workplace environments – and what Mac users can do to improve their network connectivity and remain productive.
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, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

885 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