Showing/ Accessing hidden folders and files

Hi,
In order to reinstal an application (Trend Micro sync), I first need to remove a selecion of hidden files that I used on Leopard to find under the account/library/ Application support.... They are "hidden folders and files". Under Lion I don't know how to set the finder to show them to me, especially as I don't remember the name !
Thanks for your help
Stéphane

[What Should Be Invisible Isn't|http://www.pinkmutant.com/articles/toovisible.html]
[Invisible Finder 2.1|http://www.versiontracker.com/php/dlpage.php?id=9867&db=mac&pid=7198&kind=& lnk=http%3A%2F%2Fwww.ragedownload.com%2Finvisfinder.sit] lists just invisible files. JuhOS X lists all files and flags invisible ones. Some applications let you toggle invisibility, though this doesn't take effect until you restart the Finder.
The other thing to do is verify your drive with Disk Utility. Your computer isn't likely to be suddenly deciding to hide files, but aberrant behavior could be an indicator of a corrupt drive.

Similar Messages

  • Can't hide Hidden folders and files.

    Hi All,
    This past weekend I transferred my OS and apps to a newly installed SSD drive.
    During the process I had to move some files around in order to get The OS and Apps on the SSD.
    I used a technique that utilizes the Terminal and the chflags command.
    My issue is now I can not hide the files and folders that are usually hidden.
    I can't remember the exact method I used to unhide hidden folders and files. I can't even find a reference to it in my web browsers history.
    I have searched on the web for solutions along these lines:
    defaults write com.apple.finder AppleShowAllFiles -boolean FALSE ; killall Finder
    chflags hidden
    sudo chflags hidden
    But none of these approaches have worked.
    I have downloaded Onyx, TinkerTool and Show Hide Invisible Files.
    I have used them as best I understand to hide the normally hidden files and folders, but nothing has worked.
    Any Command Line gurus out there have any suggestions?
    Many Thanks in Advance!
    Tem

    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Preferences/com.apple.finder.plist
    Right-click or control-click the highlighted line and select  
              Services ▹ Show Info in Finder (or just Show Info)
    from the contextual menu.* An Info dialog should open.
    ☞ Does the dialog show "You can read and write" in the Sharing & Permissions section?
    ☞ In the General section, is the box labeled Locked checked?
    ☞ What is the Modified date?
    If you don't have read and write access to the item, change the settings as directed here. Note, however, that if one file has wrong access settings, most likely others do as well. If the item is locked, unlock it.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. Open a TextEdit window and paste into it (command-V). Select the line you just pasted and continue as above.

  • Hidden folders and files with random character filenames

    You could try media info to see if that tells you any different - be sure to decline the stupid addons included
    https://mediaarea.net/en/MediaInfo

    Recently I noticed several hidden folders with random character names and each of those folders has 5 files in them with randomly named files. These are tiff, png, bmp, and docx files. I copied the folder to virtual machine removed from the network to inspect them, but they can not be opened as it says files appears damaged or corrupt. They appear to be benign as I ran two full system virus scans (including malwarebytes), but really bothers me how they got there in the first place. The owner says local administrators. They were found on the root of the C: drive and in documents, pictures, music, and video of the user profile. I attached a picture to help understand what they look. They are different than other examples I have seen when I attempted to google my answer. Thanks in advance!
    This topic first appeared in the Spiceworks Community

  • Hidden folders and files.  Why? and how can I unhide them?

    I have a file folder that is suddenly hidden from Finder. It was fine last week and the previous year or two that I have accessed that folder. I can still find and open it using Spotlight, and I see the correct path displayed, but when I navigate that path in Finder, the files/folders are not visible.
    Why is it hiding? None of the discussions I've read about hidden files helped explain or solve the issue. It happened with an Excel spreadsheet file a few months ago, and I was able to unhide that one with the "Hidden Files" widget. Do I really need to venture into Terminal?
    I'm on an iMac G5 with OSX 10.4.11.

    [What Should Be Invisible Isn't|http://www.pinkmutant.com/articles/toovisible.html]
    [Invisible Finder 2.1|http://www.versiontracker.com/php/dlpage.php?id=9867&db=mac&pid=7198&kind=& lnk=http%3A%2F%2Fwww.ragedownload.com%2Finvisfinder.sit] lists just invisible files. JuhOS X lists all files and flags invisible ones. Some applications let you toggle invisibility, though this doesn't take effect until you restart the Finder.
    The other thing to do is verify your drive with Disk Utility. Your computer isn't likely to be suddenly deciding to hide files, but aberrant behavior could be an indicator of a corrupt drive.

  • After upgrading to Lion OS 10.7.5 takes 10 seconds or more to access NAS folders and files

    I've upgraded my customers IMacs to Lion OS and whenever they try to access folders on the Buffalo NAS terastation it takes about 10 seconds for the folders to populate with the files. It will open right away but will look blank. If I click get info during this time it says "fetching". I'm assuming it has something to do with the SMB change with lion but don't know how to fix it. I called Buffalo and they said it must be an apple issue. I called apple and they were of no help. THe tech support person asked me to reset my computer and leave it powered of for 30 seconds......ugh. Then I asked to speak to someone higher and we got cut off.
    The Buffalo NAS terastation has SCSI drives but they are mounted to an HP Server. So the SMB connection is to the HP Server running server 2003. Any help would be greatly appreciated.

    Any luck getting the info on SMBX parameters like OPLOCKS ? This is apparently causing an issue with Autodesk Revit. I am resorting to installing SMBUP.
    There is an article that describes this method for altering the Lion smbd configuration parameters for honoring ACLs:
    sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server AclsEnabled -bool NO
    from this article
    http://support.apple.com/kb/TS4149
    and this:
    http://www.stanford.edu/group/macosxsig/blog/2011/08/enable-logging-with-107-smb x-w.html

  • Accessing Dock Sub-Folders and Files

    With the implementation of Stacks in Leopard I've noticed that I've lost the ability to access sub-folders and files within folders contained in the Dock. In Tiger I could access any sub-folder or file from the pop-up menu of a folder in the Dock. Using Stacks, I can only access a sub-folder and have its window open.
    Does anybody know if there is a way to access the files within the sub-folder without having to open that folder window? I find this a step backward from Tiger as you have to use multiple steps to access a file that may be several folders deep.
    Any suggestions would be most welcome.

    I might also add, what you see as a step back, there is also a step forward here. Before the only method of sorting the folder contents off the Dock without opening a Finder window was by name. Now you have several methods when you switch from opening in arc to grid mode, by clicking once on the stack and changing the mode from automatic to grid. This shows all the stack items then in any sort view you want once grid is selected.

  • MY system folder, including hidden folders are littered with duplicate folders and files with the suffix (from old Mac) How do I remove them

    I have a Macbook Pro running Leopard 10.5.8. I had a problem with my my operating system (my fault, I moved a file I shoudnt have) couldnt boot up but was able to boot up from a backup. I managed to repair my original system except now all the system folders, including hidden folders are littered with duplicate folders and files with the suffix (from old Mac).  For the most part the dupes are an exact copy, but not always.  I want to remove them to free up space and cant imagine duplicate folders in the /system/library are not hindering my computer. But I dont know where to start and am afraid of doing irreparable damage. Any ideas

    pacull,
    Use iCal>View>Show Notifications to choose what to do with the notification.

  • Accessing Windows Drive its folders and files through KM

    Hi All,
    I have portal server installed in my laptop with KM, i would like to access windows C drive with all folders and files in my local machine what are the configurations i have to do.
    One more thing
    In real time scenario can we use CM repository, my requiremtn is to store documents of diffrent king which repository we can use which data base what configurations we have to set, basically what is the difference between internal and external repositories.
    regards,
    Murali

    Hi Murali,
    Internal repositories are those which come created in the KM like etc, documents and many more.
    External repositories are folders on diff locations (either on server or at other system) which are mapped to KM as repositories.
    Now. about ur requirement : You can try mapping the path c:\ as a folder in KM by making a File Repository manager.
    For storing different kind of  documents you can make different folders in Windows and map them as repositories by configuring File Rep managers for them
    See this[ link|http://help.sap.com/saphelp_nw04s/helpdata/en/e3/92322ab24e11d5993800508b6b8b11/frameset.htm]  to know about configuring a file repository manager.
    I hope it helps.
    Regards,
    Sumit

  • Finder not able to view folders and files on EHD after updating to OS X 10.9.4

    I can see still see 'Hitachi' in the 'Devices' Sidebar, but I am not able to view folders and files on this Hitachi XL2000 2TB FAT32 Hard Drive (EHD) that is USB connected to the iMac below.
    Late 2013 Apple iMac (27-inch Display 2560 x 1440), 3.4GHz Quad-core Intel Core i5, Turbo Boost up to 3.8GHz, 8GB 1600MHz DDR3 SDRAM - 2X4GB, 512GB Flash Storage, NVIDIA GeForce GTX 775M 2GB GDDR5, Magic Trackpad, Apple Wireless Keyboard and OS X 10.9.4 Mavericks
    All was fine until I updated from OS X 10.9.3 to 10.9.4 earlier this week, so now when I double-click on 'Hitachi' it just loads and loads with nothing happening and never displays the folder and file contents of the EHD.
    Also, confirmed that Hitachi EHD has been removed from Spotlight indexing per System Preferences > Privacy > + > Hitachi and it was so this does not seem to be an indexing issue.
    I have used OnyX and Apple Disk Utilities unsuccessfully to try and fix this problem.
    Interestingly, Backblaze online backup still sees the EHD and connecting this EHD to a Win 8.1 PC also sees the EHD.
    Further, I ran the commands below in 'Terminal' to make sure the drive was visible and got the following results which shows that the EHD is not hidden.
    iMac:Applications john$ chflags nohidden /Volumes/Hitachi/
    iMac:Applications john$ GetFileInfo /Volumes/Hitachi/
    directory: "/Volumes/HITACHI"
    attributes: avbstclinmedz
    modified: 07/10/2014 23:26:44
    Finally, I installed XtraFinder and am still not able to see the contents of the EHD, but when I installed OmniDiskSweeper I can navigate the EHD folder tree with no problems and can see the contents of the EHD, but when I try and open up a file it opens Finder which loads and loads and nothing happens.

    Apple Support was quite helpful, but in the end I will wait to do a clean install of OS X Yosemite which is due in the Fall and not try and fix OS X 10.9.4 Mavericks.
    It turns out that I run backups on my '/Users/john/Library' and the size of this folder before the 10.9.4 update was 1.07 GB and after the update it is 806.9 MB which is baffling, but in the end all of these problems should be resolved with a clean install of OS X Yosemite.
    One lesson learned for the future is that I will wait on installing an update until it has been in the wild for awhile as a quick OS X Mavericks Finder Problem search and similar searches show there could be an issue.

  • Taking Ownership of folders and files

    So I am doing what sure seems like way too much work to do something rather simple in GUI. There seem to be many topics on this and I base my code off of their results, but it isn't working entirely. Hopefully an easy one for you folks!  I am trying
    to take ownership of a path, be it a file or folder.  I DO NOT want to use a separate module like PSCX as not all machines will have the module.
    I created a function based off the code I found at the end of
    http://social.technet.microsoft.com/Forums/en-US/87679d43-04d5-4894-b35b-f37a6f5558cb/ that I can pass a path to singularly or I was hoping to be able to pipe Get-ChildItem to it.  When I do "Get-ChildItem -Path D:\Permissions\TopFolder -Recurse
    -Force | Take-Ownership" it seemed to work, but then I noticed it only seems to work going one layer deep. The text output for troubleshooting shows it recursing all the way through, but yet Owner is not being set all the way down.
    Folder layout:
    D:\Permissions\TopFolder
    D:\Permissions\TopFolder\FirstFolder
    D:\Permissions\TopFolder\FirstFile.txt
    D:\Permissions\TopFolder\FirstFolder\SecondFolder
    D:\Permissions\TopFolder\FirstFolder\SecondFile.txt
    D:\Permissions\TopFolder\FirstFolder\SecondFolder\ThirdFolder
    D:\Permissions\TopFolder\FirstFolder\SecondFolder\ThirdFile.txt
    Function Take-Ownership {
    [CmdletBinding(DefaultParameterSetName=”Set01”)]
    Param(
    [parameter(Mandatory=$true,ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,Position=1,ParameterSetName='Set01')]
    [string]$Path,
    [parameter(Mandatory=$true,ValueFromPipelinebyPropertyName=$True,ParameterSetName='Set02')]
    [Alias('FullName')][string]$FullPath
    ) # End of Param()
    Begin {
    # Check that script was Run as Administrator
    If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
    [Security.Principal.WindowsBuiltInRole] "Administrator")) {
    Write-Host -ForegroundColor Red -BackgroundColor Black "`n ERROR: You MUST have Administrator rights to run this script!"
    Write-Host -ForegroundColor Red -BackgroundColor Black " Re-run this script as an Administrator!`n"
    Break
    #P/Invoke'd C# code to enable required privileges to take ownership and make changes when NTFS permissions are lacking
    $AdjustTokenPrivileges = @"
    using System;
    using System.Runtime.InteropServices;
    public class TokenManipulator
    [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
    internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall,
    ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr relen);
    [DllImport("kernel32.dll", ExactSpelling = true)]
    internal static extern IntPtr GetCurrentProcess();
    [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
    internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr
    phtok);
    [DllImport("advapi32.dll", SetLastError = true)]
    internal static extern bool LookupPrivilegeValue(string host, string name,
    ref long pluid);
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    internal struct TokPriv1Luid
    public int Count;
    public long Luid;
    public int Attr;
    internal const int SE_PRIVILEGE_DISABLED = 0x00000000;
    internal const int SE_PRIVILEGE_ENABLED = 0x00000002;
    internal const int TOKEN_QUERY = 0x00000008;
    internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020;
    public static bool AddPrivilege(string privilege)
    try
    bool retVal;
    TokPriv1Luid tp;
    IntPtr hproc = GetCurrentProcess();
    IntPtr htok = IntPtr.Zero;
    retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok);
    tp.Count = 1;
    tp.Luid = 0;
    tp.Attr = SE_PRIVILEGE_ENABLED;
    retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid);
    retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
    return retVal;
    catch (Exception ex)
    throw ex;
    public static bool RemovePrivilege(string privilege)
    try
    bool retVal;
    TokPriv1Luid tp;
    IntPtr hproc = GetCurrentProcess();
    IntPtr htok = IntPtr.Zero;
    retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok);
    tp.Count = 1;
    tp.Luid = 0;
    tp.Attr = SE_PRIVILEGE_DISABLED;
    retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid);
    retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
    return retVal;
    catch (Exception ex)
    throw ex;
    Add-Type $AdjustTokenPrivileges
    # Activate necessary admin privileges to make changes without NTFS perms on the folder
    [void][TokenManipulator]::AddPrivilege("SeRestorePrivilege") # Necessary to set Owner Permissions
    [void][TokenManipulator]::AddPrivilege("SeBackupPrivilege") # Necessary to bypass Traverse Checking
    [void][TokenManipulator]::AddPrivilege("SeTakeOwnershipPrivilege") # Necessary to override File Permissions
    $Admin = New-Object System.Security.Principal.NTAccount("BUILTIN\Administrators")
    $NewDirACL = New-Object System.Security.AccessControl.DirectorySecurity
    $NewFileACL = New-Object System.Security.AccessControl.FileSecurity
    $NewDirACL.SetOwner($Admin)
    $NewFileACL.SetOwner($Admin)
    } # End of Begin {}
    Process {
    if( $FullPath.Length -gt 0 ) {
    if( Test-Path $FullPath ) {
    $Path = $FullPath
    if( Test-Path $Path -PathType Container ) {
    "Take Ownership: $Path"
    $Folder = Get-Item $Path -Force
    $Folder.SetAccessControl($NewDirACL)
    } elseif( Test-Path $Path -PathType Leaf ) {
    "Take Ownership: $Path"
    $File = Get-Item $Path -Force
    $File.SetAccessControl($NewFileACL)
    } else {
    Write-Host -ForegroundColor Red -BackgroundColor Black "ERROR: Path does not exist: $Path"
    } # End of Process {}
    End { } # End of End {}
    } # End of Function Take-Ownership
    To run this I have been doing:
    PS D:\> $Folder = 'D:\Permissions\TopFolder'
    PS D:\> Get-Item $Folder | Get-Acl
    Directory: D:\Permissions
    Path Owner
    TopFolder DOMAIN\user1
    PS D:\> Get-ChildItem $Folder -Force -Recurse | Get-Acl
    Directory: D:\Permissions\TopFolder
    Path Owner
    FirstFolder DOMAIN\user1
    FirstFile.txt DOMAIN\user1
    Directory: D:\Permissions\TopFolder\FirstFolder
    Path Owner
    SecondFolder DOMAIN\user1
    SecondFile.txt DOMAIN\user1
    Directory: D:\Permissions\TopFolder\FirstFolder\SecondFolder
    Path Owner
    ThirdFolder DOMAIN\user1
    ThirdFile.txt DOMAIN\user1
    PS D:\>
    PS D:\> Get-Item $Folder | Take-Ownership
    Take Ownership: D:\Permissions\TopFolder
    PS D:\> Get-ChildItem $Folder -Force -Recurse | Take-Ownership
    Take Ownership: D:\Permissions\TopFolder\FirstFolder
    Take Ownership: D:\Permissions\TopFolder\FirstFile.txt
    Take Ownership: D:\Permissions\TopFolder\FirstFolder\SecondFolder
    Take Ownership: D:\Permissions\TopFolder\FirstFolder\SecondFile.txt
    Take Ownership: D:\Permissions\TopFolder\FirstFolder\SecondFolder\ThirdFolder
    Take Ownership: D:\Permissions\TopFolder\FirstFolder\SecondFolder\ThirdFile.txt
    PS D:\>
    PS D:\>
    PS D:\> Get-Item $Folder | Get-Acl
    Directory: D:\Permissions
    Path Owner
    TopFolder BUILTIN\Administrators
    PS D:\> Get-ChildItem $Folder -Force -Recurse | Get-Acl
    Directory: D:\Permissions\TopFolder
    Path Owner
    FirstFolder BUILTIN\Administrators
    FirstFile.txt BUILTIN\Administrators
    Directory: D:\Permissions\TopFolder\FirstFolder
    Path Owner
    SecondFolder DOMAIN\user1
    SecondFile.txt DOMAIN\user1
    Directory: D:\Permissions\TopFolder\FirstFolder\SecondFolder
    Path Owner
    ThirdFolder DOMAIN\user1
    ThirdFile.txt DOMAIN\user1
    PS D:\>
    I don't know why this isn't working.  The output text shows I went through the subfolders and files...HELP!
    Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.

    Here is the end result. I am looking to add a '-Recurse'/'-Force' switches to give another option to not have to Get-ChildItem and pipe it to the function and possibly a '-User' parameter to be able to specify who to set as owner, but both of those ideas
    are untested.
    Here is the code.  Hope it helps someone else.
    Function Take-Ownership {
    <#
    .SYNOPSIS
    This function takes ownership of a file or folder and sets it back to 'BUILTIN\Administrators'.
    .DESCRIPTION
    This function takes ownership of a file or folder and sets it back to 'BUILTIN\Administrators'.
    This will work even when the user does not have ownership or existing permissions on the file or folder.
    .EXAMPLE
    PS C:\> Take-Ownership -Path $Path
    Takes ownership of the individual folder or file. The -Path is optional as long as $Path
    is the first parameter.
    .EXAMPLE
    PS C:\> Get-Item $Path | Take-Ownership
    Takes ownership of the individual folder or file.
    .EXAMPLE
    PS C:\> Get-ChildItem $Path -Recurse -Force | Take-Ownership
    Recurse through all folders and files, including hidden, and takes ownership.
    #>
    [CmdletBinding()]
    Param(
    [parameter(Mandatory = $true, ValueFromPipeline = $True, ValueFromPipelinebyPropertyName = $True, Position = 0)]
    [Alias('FullName')]
    [string]$Path
    ) # End of Param()
    Begin {
    # Check that script was Run as Administrator
    If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
    [Security.Principal.WindowsBuiltInRole] "Administrator")) {
    Write-Host -ForegroundColor Red -BackgroundColor Black "`n ERROR: You MUST have Administrator rights to run this script!"
    Write-Host -ForegroundColor Red -BackgroundColor Black " Re-run this script as an Administrator!`n"
    Return
    #P/Invoke'd C# code to enable required privileges to take ownership and make changes when NTFS permissions are lacking
    $AdjustTokenPrivileges = @"
    using System;
    using System.Runtime.InteropServices;
    public class TokenManipulator
    [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
    internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall,
    ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr relen);
    [DllImport("kernel32.dll", ExactSpelling = true)]
    internal static extern IntPtr GetCurrentProcess();
    [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
    internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr
    phtok);
    [DllImport("advapi32.dll", SetLastError = true)]
    internal static extern bool LookupPrivilegeValue(string host, string name,
    ref long pluid);
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    internal struct TokPriv1Luid
    public int Count;
    public long Luid;
    public int Attr;
    internal const int SE_PRIVILEGE_DISABLED = 0x00000000;
    internal const int SE_PRIVILEGE_ENABLED = 0x00000002;
    internal const int TOKEN_QUERY = 0x00000008;
    internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020;
    public static bool AddPrivilege(string privilege)
    try
    bool retVal;
    TokPriv1Luid tp;
    IntPtr hproc = GetCurrentProcess();
    IntPtr htok = IntPtr.Zero;
    retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok);
    tp.Count = 1;
    tp.Luid = 0;
    tp.Attr = SE_PRIVILEGE_ENABLED;
    retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid);
    retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
    return retVal;
    catch (Exception ex)
    throw ex;
    public static bool RemovePrivilege(string privilege)
    try
    bool retVal;
    TokPriv1Luid tp;
    IntPtr hproc = GetCurrentProcess();
    IntPtr htok = IntPtr.Zero;
    retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok);
    tp.Count = 1;
    tp.Luid = 0;
    tp.Attr = SE_PRIVILEGE_DISABLED;
    retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid);
    retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
    return retVal;
    catch (Exception ex)
    throw ex;
    Add-Type $AdjustTokenPrivileges
    # Activate necessary admin privileges to make changes without NTFS perms on the folder
    [void][TokenManipulator]::AddPrivilege("SeRestorePrivilege") # Necessary to set Owner Permissions
    [void][TokenManipulator]::AddPrivilege("SeBackupPrivilege") # Necessary to bypass Traverse Checking
    [void][TokenManipulator]::AddPrivilege("SeTakeOwnershipPrivilege") # Necessary to override File Permissions
    } # End of Begin {}
    Process {
    # Process for taking Ownership of the folder
    # - Specify the NT Account user to set as Owner (BUILTIN\Administrators)
    # - Create a new ACL object for the sole purpose of defining a new owner
    # - Establish the new ACL as owned by BUILTIN\Administrators, thus
    # guaranteeing the following ACL changes can be applied.
    # - Then apply that update to the existing folder's ACL which merges
    # the proposed changes (new owner) into the folder's actual ACL
    # - - IN OUR CASE OVERWRITING THE OWNER
    # - Additional Documentation:
    # http://msdn.microsoft.com/en-us/library/System.Security.AccessControl(v=vs.110).aspx
    $Admin = New-Object System.Security.Principal.NTAccount("BUILTIN\Administrators")
    $NewDirACL = New-Object System.Security.AccessControl.DirectorySecurity
    $NewFileACL = New-Object System.Security.AccessControl.FileSecurity
    $NewDirACL.SetOwner($Admin)
    $NewFileACL.SetOwner($Admin)
    if( Test-Path $Path -PathType Container ) {
    $Folder = Get-Item $Path -Force
    $Folder.SetAccessControl($NewDirACL)
    } elseif( Test-Path $Path -PathType Leaf ) {
    $File = Get-Item $Path -Force
    $File.SetAccessControl($NewFileACL)
    } else {
    Write-Host -ForegroundColor Red -BackgroundColor Black "ERROR: Path does not exist: $Path"
    } # End of Process {}
    End { } # End of End {}
    } # End of Function Take-Ownership
    Find this post helpful? Does this post answer your question? Be sure to mark it appropriately to help others find answers to their searches.

  • Unable to rename folders and files on SharePoint mapped drive.

    I just installed a fresh copy of Windows 7 and have mapped a drive to my SharePoint "Shared Documents" folder.  I am able to open, save, and delete files and folders.  However, I am unable to rename files and folders.  No matter how long of
    short of a name I use I get the following error:
    "The file name you specified is not valid or too long.  Specify a different file name."
    I've mapped the "S" drive to http://hostname.domain.com/Shared Documents/
    I am a SharePoint Admin, and have confirmed that if I do not have this problem if I log into SharePoint with IE.  I have also confirmed that others are not experiencing this issue. Also, this issue did not exist on my previous installation of Windows
    7.  Therefore I assume this is a config issue.
    Also, in "My Computer" it shows the mapped SharePoint drive as a "FAT" filesystem.

    Did some more testing. From my mapped drive, I can create new folders and files, and delete them.  I created a folder in Windows Explorer, when I tried to give a name it gave me the above error and saved the folder as "New Folder".  No matter when
    I try, I cannot rename this folder unless I log into the SharePoint interface.
    Next, I tried this from the command line.  I moved to my S drive, and did a "mkdir test" and was able to create a folder named test.  Next I tried to "rename test testing" and received the following error:
    The filename, directory name, or volume label syntax is incorrect.
    The full path is S:\test.  If I do a "mkdir testing" I am able to create the folder.  If I try to rename the folder in Explorer, it gives me the "file name not valid or too long".  I'm obviously well under the 260 character limit, so there
    has to be something wrong with the fiel name, or drive mapping.
    Also, when I "dir" the S drive it tells me the drive has no label.  "Volume in drive S has no label."
    I'm having the same issue with files. I can create a file, modify it, delete it, but can't rename it.

  • How can I explore the folders and files on my phon...

    How can I explore the folders and files on my phone from my phone (lumia 920)?

    the file system including all the data pertaining to that partition is closed on windowsphone8, unlike that of Symbian.
    the only part you will be able to see is what you would see in this post here: /t5/Nokia-Lumia/Transfer-file-for-920/m-p/1605954#M24335
    the rest is locked unless you have developer access, and even then not much as you would just use the SDK to make your applications.

  • How get SharePoint Library Folders and Files directory structure in to my custom web site.

    Hi,
    Actually my requirement is, I would like to pass site name and document library name as a parameter and get a folders and files from the document library and form the directory structure by using Treeview control in my web site.
    How should i get? Using Web service / object model?
    Web service would return the dataset as a result so from that how could i form the directory structure using Treeview control.
    I will select specified files and folders then i ll update sharepoint document library columns for corresponding selected files.
    Can anyone help over this, that would be great appreciate.
    Thanks in Advance.
    Poomani Sankaran

    Hello,
    Here is the code to iterate through sites and lists:
    //iterate through sites and lists
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite site = new SPSite(webUrl)) {
    using (SPWeb oWebsite = site.OpenWeb())
    SPListCollection collList = oWebsite.Lists;
    foreach (SPList oList in collList)
    {//your code goes here }
    Then use RecursiveAll to get all files and folders.
    http://www.codeproject.com/Articles/116138/Programatically-Copy-and-Check-In-a-Full-Directory
    http://sharepoint.stackexchange.com/questions/48959/get-all-documents-from-a-sharepoint-document-library
    Here is the full code:
    http://antoniolanaro.blogspot.in/2011/04/show-document-library-hierarchy-in-tree.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • The server is available on your computer. Access the volume and files local

    I recently did a clean install on my MacBook (from Leopard to Snow Leopard) and got this error when attempting screen sharing. I provide limited support at my office and do that primarily through screen sharing. One thing I noticed after the install was not only could I not screen share with anyone on the local network, but if anyone tried to connect access my shared folder it would actually open the shared folder of another computer on the network.
    Whereas Screen Sharing would simply time out if I attempted to connect to the majority of computers on the network. However, when I tried connecting to the machine whose shared folders would open if someone tried connecting to my computer, I got the "Connection failed. The server is available on your computer. Access the volumes and files locally." error.
    After performing a hard reset on our Airport Base Station I am now able to screen share with the other computers on our network EXCEPT for the one that gave me the error in quotes above. Any ideas?

    Hi,
    I also encountered this error but in a different situation : after having restored my Lion installation from a Time Machine backup, everything was okay except that I couldn't connect to any disk attached to my Airport extreme.
    I searched for hours and even restored my backup a second time. The problem is specific to only one client since my Macbook was still able to connect to the AE. I ended up resetting all the settings on the AE and restoring them one by one.
    The problem appears when I restore the address range distributed by the AE's DHCP server to the one that was configured before.
    Thus the solution seems to change this address range. Must be something related to a network route or cache or anything like this.
    I hope it will help anybody who encounters this problem. Luckily it seems there are very few : the number of occurences of this problem in google is very low.
    Matt

  • How to find folders and files by its partial name c#

    in a specific folder of my hard drive i have stored many other sub folder and files. now i want to list those folders and files name by their partial name.
    for example
    c webapi xx folder
    c mvctutorial xx folder
    done webapi xx folder
    webapi done folder
    webapi.zip file
    mvc.iso file
    now when i like to search by partial name webapi then i want to get list of files and folders name which has webapi word. i want to show their full folder or file name in grid with their full path and size. like below way.
    Name Type location Size
    c webapi xx folder c:\test1 2 KB
    c mvctutorial xx folder c:\test3 3 KB
    done webapi xx folder c:\test1 11 KB
    webapi done folder c:\test1 9 KB
    webapi.zip file c:\test1 20 KB
    mvc.iso file c:\test4 5 KB
    i got a sample code which look like for finding files but the below code may not find folder. so i am looking for a sample code which will find files and folders too. so guide me to solve my issue.
    the below sample code will find files but not sure does it find files by partial name. here is the code. i am not before dev environment. so could not test the below code.
    find files code
    static void Main(string[] args)
    string partialName = "webapi";
    DirectoryInfo hdDirectoryInWhichToSearch = new DirectoryInfo(@"c:\");
    FileInfo[] filesInDir = hdDirectoryInWhichToSearch.GetFiles("*" + partialName + "*.*");
    foreach (FileInfo foundFile in filesInDir)
    string fullName = foundFile.FullName;
    Console.WriteLine(fullName);

    See code below
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.IO;
    namespace ConsoleApplication1
    class Program
    static void Main(string[] args)
    string partialName = "webapi";
    DirectoryInfo hdDirectoryInWhichToSearch = new DirectoryInfo(@"c:\");
    FileInfo[] filesInDir = hdDirectoryInWhichToSearch.GetFiles("*" + partialName + "*.*");
    foreach (FileInfo foundFile in filesInDir)
    string fullName = foundFile.FullName;
    Console.WriteLine(fullName);
    DirectoryInfo[] foldersInDir = hdDirectoryInWhichToSearch.GetDirectories("*" + partialName + "*.*");
    foreach (DirectoryInfo foundFolder in foldersInDir)
    string fullName = foundFolder.FullName;
    Console.WriteLine(fullName);
    // or
    List<string> filesInDir2 = hdDirectoryInWhichToSearch.GetFiles("*" + partialName + "*.*").Select(x => x.FullName).ToList();
    filesInDir2.AddRange( hdDirectoryInWhichToSearch.GetDirectories("*" + partialName + "*.*").Select(x => x.FullName).ToList());
    foreach (string filesFolders in filesInDir2)
    Console.WriteLine(filesFolders);
    jdweng

Maybe you are looking for

  • AMC PO for an Asset

    Dear Experts, We are a mining company, where we have lot of Vehicles and Equipments (ASSETS) which are under AMC. We have individual ASSET CODEs for each Asset. In the AMC PO, we want to mention ASSET CODE of the Asset, so that, the system to notify

  • External monior and forgotten settings

    My MacBook is used with a Sony 23" monitor connected through a BookEndz dock and video converter cable. 95% of the time, the external monitor is connected and on. Almost every Startup requires that I reset the monitors (Detect Displays) and then manu

  • ADC to MiniDisplay Port

    Hi, I've got a MacPro and a 30'' cinema display connect on the dvi port. I've got an old 23'' display with an ADC port, and I want to connect it on the mini display port... Is it possible ? How can I make that ? Thanks a lot for help...

  • Report Designer : Can we embed output of Report Designer in worksheets

    Need to know, can we embed reports created in Report Designer to a worksheet.

  • MSS KEY_FIGURE_MONITOR

    Hi, I have implemented ESS & MSS. Our systems are ECC 6.0 EP 7 SP 15 ESS & MSS 1.0 XSS 600 SP 6 BP for Common Parts I have full authorization for the user in both ECC and Portal system and most of the performed post installation MSS configuration. Th