Automatically restore windows network drive (red "X") via batch file
        Posted  
        
            by 
                user33958
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by user33958
        
        
        
        Published on 2012-12-11T09:33:29Z
        Indexed on 
            2012/12/11
            11:05 UTC
        
        
        Read the original article
        Hit count: 287
        
i need check if a network drive is mapped and accessible. From time to time windows displays a red X on the drive, and i would need to manually click the drive in explorer to reconnect. I already found solutions which involve editing the registry which unfortunately isn´t possible.
So i would need a batch file checking for connection, and (re-)mounting the drive. What i´m using at the moment:
IF NOT EXIST z: net use z: \\10.211.55.5\test
© Server Fault or respective owner