Dan Lewis
Member
Registered: 31st Jan 05
Location: Leicestershire
User status: Offline
|
Need to create something to notify when a file is missing.
example:
want it to go through the files they are allways go up 1-2-3-4-5 but i want it to say when one is missing
temp001.dwn
temp002.dwn
temp003.dwn
<-- 4 is missing so the batch file says This is missing
temp005.dwn
cheers
|
Dan Lewis
Member
Registered: 31st Jan 05
Location: Leicestershire
User status: Offline
|
wouldn't need to be a batch file either,
could be web based maybe
|
Richie
Member
Registered: 3rd Dec 02
Location: Newport, Wales
User status: Offline
|
@echo off
if exist c:\temp001.dwn goto exists
echo File temp001.dwn does not exist!
goto end
:exists
echo File temp001.dwn exists!
:end
@echo off
if exist c:\temp002.dwn goto exists
echo File temp002.dwn does not exist!
goto end
:exists
echo File temp002.dwn exists!
:end
@echo off
if exist c:\temp003.dwn goto exists
echo File temp003.dwn does not exist!
goto end
:exists
echo File temp003.dwn exists!
:end
@echo off
if exist c:\temp004.dwn goto exists
echo File temp004.dwn does not exist!
goto end
:exists
echo File temp004.dwn exists!
:end
@echo off
if exist c:\temp005.dwn goto exists
echo File temp005.dwn does not exist!
goto end
:exists
echo File temp005.dwn exists!
:end
pause
You can easily tidy that up though but I cannot be arsed
|
Dan Lewis
Member
Registered: 31st Jan 05
Location: Leicestershire
User status: Offline
|
thats great that is matey!
so i'll have to write this to say temp100.dwn
to go through the entire structure
|
Richie
Member
Registered: 3rd Dec 02
Location: Newport, Wales
User status: Offline
|
That would be my current way of doing it because I cant think straight!
I've taken my tablets so my thinking ability is a bit stuffed.
You could have a better result with a VBScript though.... but I really dont wanna take my mind there today
|
Dan Lewis
Member
Registered: 31st Jan 05
Location: Leicestershire
User status: Offline
|
right new one
\\uhs_sql\f$\So_arc\ANGELTO\TRAVEL\
thats the location
but this needs to be user defined each time the batch file is ran
[Edited on 23-11-2007 by Dan Lewis]
|
Dan Lewis
Member
Registered: 31st Jan 05
Location: Leicestershire
User status: Offline
|
sorted it
set /P theuserinput="Enter The user Name:
@echo off
if exist c:\so_arc\%theuserinput%\travel\*00001.DWN goto exists
echo File 00001.dwn does not exist!
goto end
:exists
echo File 00001.dwn exists!
:end
|