corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Batch File help


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Batch File help
Dan Lewis
Member

Registered: 31st Jan 05
Location: Leicestershire
User status: Offline
22nd Nov 07 at 17:05   View User's Profile U2U Member Reply With Quote

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
22nd Nov 07 at 17:11   View User's Profile U2U Member Reply With Quote

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
22nd Nov 07 at 17:20   View User's Profile U2U Member Reply With Quote

@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
22nd Nov 07 at 17:24   View User's Profile U2U Member Reply With Quote

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
22nd Nov 07 at 17:26   View User's Profile U2U Member Reply With Quote

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
23rd Nov 07 at 08:42   View User's Profile U2U Member Reply With Quote

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
23rd Nov 07 at 09:40   View User's Profile U2U Member Reply With Quote

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

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
photoshop batch action method. R Lee Snap Day 3 1221
12th Jul 04 at 17:14
by Icy
 
Batch file writing Skinz Geek Day 3 723
6th Jul 05 at 11:32
by loafofbrett
 
Autorun/Commands Dan Lewis Geek Day 2 429
20th Oct 06 at 13:18
by almost_me
 
MS Dos Help Andrew Geek Day 9 1056
10th Dec 06 at 14:59
by Sam
 
Need to convert a batch file into VBScript Richie Geek Day 6 599
18th Oct 07 at 23:05
by Richie
 

Corsa Sport » Message Board » Off Day » Geek Day » Batch File help 29 database queries in 0.0059779 seconds