Register
: :
Login
Home
News
Forums
Scripts
User Groups
Resources
About
Forums
Search
Members
Unanswered
Active Topics
Forums
>
Looking Ahead
>
Using PowerShell v2.0
problem with ren
Last Post 22 Mar 2010 06:34 PM by
Marco Shaw (MVP)
. 1 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
zim
New Member
Posts:19
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)
Veteran Member
Posts:1647
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.
Using PowerShell
--General PowerShell
--Books, Tools, and Videos
--Exchange Server
--Active Directory
--System Center Family
--Non-Microsoft Products
--SharePoint
--SQL Server
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Forums
>
Looking Ahead
>
Using PowerShell v2.0
Active Forums 4.3
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2