Software‎ > ‎

Has Running Process

This is a Windows command line utility that lists processes running in a folder on your machine.

Example Output

C:\>has_running_process c:\foobar
C:\foobar\bin\file_merge.exe [6088]
This can be very handy from scripting perspective since if you are running a script that updates files in a folder and it would be bad if some of them are required by running processes on your machine.

Example.bat

@echo off
rem If a process is running in c:\foobar we can't copy.  Check if it's 
rem running and redirect the output to nul since we are not interested 
rem in the process name or id.
has_running_process c:\foobar >nul
if ERRORLEVEL 1 (
  echo Skipping file copy....
  goto :EOF
)
echo Copying files
...
Download the attachment below and expand the files to a folder on your machine. No further installation required. The package contains two different versions of the executable, one for 32-bit and the other for 64-bit versions of Windows. They have been tested on Windows XP and Windows Vista.
ċ
has_running_process.zip
(145k)
Sverrir Á. Berg,
Feb 20, 2012, 1:44 PM
Comments