header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
problem with ren
Last Post 22 Mar 2010 06:34 PM by Marco Shaw (MVP). 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
zimUser is Offline
New Member
New Member
Posts:19
Avatar

--
22 Mar 2010 02:27 PM
    I have a script that uses the ren to rename some directories. The directories are on a map network drive, and this use to work. In the last week or so it started failing with:
    Rename-Item : The process cannot access the file because it is being used by an
    other process.
    Is there any way to force this to rename the directory? I have tried the -force opiton but that doesn't seam to work either.

    Also does anyone know of a way to find out who is using this directory?
    Thanks
    Marco Shaw (MVP)User is Offline
    Veteran Member
    Veteran Member
    Posts:1647
    Avatar

    --
    22 Mar 2010 06:34 PM
    Try possibly using handle.exe to see who/what might have a lock:
    http://technet.microsoft.com/en-ca/...96655.aspx
    Marco

    *Microsoft MVP - Windows PowerShell
    https://mvp.support.microsoft.com/profile/Marco.Shaw
    *Co-Author - Sams Windows PowerShell Unleashed 2nd Edition
    *Blog - http://marcoshaw.blogspot.com
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer