windows


net use command: delete fails due to files in use


I have a .bat file that runs overnight on our Windows server. It maps 2 network drives and does some file copying and zipping. At the end of the script, it removes the network drives. However, on occasion, the job is not completing. I review the logs and it shows that my .bat file is prompting for a confirmation on the following line due to the drive in use.
net use F: /d
It was suggested to add /y to the end of the script to handle the prompt. However, I would like to confirm that the drive truly is still not in use.
Is there a way to keep attempting to remove the drive until it is successful without prompting?

Related Links

Batch File Loops with delims
Adding dependency to NSIS installer
How to browse for file (Win7/64bits)
Creating a HBITMAP from an existing buffer
Batch file to move bottom folder into specified location
Accessing command-line arguments in ASM (Win 7)
Filename too long in git for windows
Can't compile a simple hello world using GHC 7.8rc2 and Windows 7 (or install packages with cabal)
How can I set up an alert to send an email when someone does a vip swap in azure
Why does PowerShell display “DarkYellow” text improperly?
How do I modify keys in a KeyboardProc hooking procedure?
Is there a way to make an existing cmd window execute commands?
Access x64 TEB C++ & Assembly
How to get path of current active application window?
Windows azure mobile service script
Visual Studio Express 2013 for Desktop troubleshooting

Categories

HOME
android
algorithm
api
twig
fftw
r-googlesheets
newrelic
google-cloud-datalab
crystal-lang
nstableheaderview
title
recordrtc
arangodb
endeca
filechannel
flatpak
docx
gruntfile
dimensional-modeling
android-7.0-nougat
xmonad
event-store
qliksense
oculus
instantiation
getpixel
baidu-map
amazon-ses
node-mssql
odroid
railstutorial.org
loading
jvmti
numberpicker
plaintext
android-softkeyboard
linqpad
apollostack
memory-mapping
dapper-simplecrud
libgphoto2
dotnet-httpclient
chai-as-promised
rserve
scalding
bbpress
janus
offline.js
filenet
rmongo
change-tracking
cudd
meteor-packages
vulcanize
i386
expectations
stream-processing
cycle2
google-books
opserver
rpart
slash
rdflib
skspritenode
mraid
android-broadcast
primitive-types
easyrtc
teaspoon
rmysql
jama
authlogic
dsym
openargs
model-driven-development
dtmf
observium
neos-server
process-explorer
node-blade
argouml
device-width
usertype
koken
box2d-iphone
inline-formset
django-paypal
rowlex
binomial-heap
interprocess
isapi-extension
zend-rest
wcf-instancing
complex-event-processing
leader
blind

Resources

Encrypt Message