Solved

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

Posted on 2016-08-12
4
34 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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
Article by: Justin
In light of the WannaCry ransomware attack that affected millions of Windows machines, you might wonder if your Mac needs protecting. Yes, it does and here is how to do it.
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

635 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