WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
test for path substring? (Read 2581 times)
kenwshmt
YaBB Newbies
*
Offline



Posts: 11
test for path substring?
Aug 6th, 2005 at 6:48pm
 
I have a batch file process a directory, moving the files to another outside directory.

I need to do aditional processing on the files, but not have them where they started from, but having them outside the watch path i would have to run a different batch file.

I want to put it into the same watch directory in a subfolder, but the opperations that have already been run, dont need to be rerun on several types of files.

How can i test d:\watch\2\done for d:\watch\2\ and either perform or not if that is part of the path?

there are far to many substring paths to do it manually.

Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: test for path substring?
Reply #1 - Aug 7th, 2005 at 9:08pm
 
Did you look at the matches option of gdPUtil (http://www.watchdirectory.net/watchDir/GdPUtil.html)?

It lets you check for dos wildcards, like:
gdputil -matches "%WD_FILE%" "*\watch\?\*"
if %ERRORLEVEL% == 1 (ECHO MATCH) else (ECHO NOMATCH)

So, inside your .bat you could do
Code:
gdputil -matches "%WD_FILE%" "*\done\*"
if %errorlevel 1 goto :matchesTheDoneDirectory

.. here is doesn't match the "done" directory..
 



Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
kenwshmt
YaBB Newbies
*
Offline



Posts: 11
Re: test for path substring?
Reply #2 - Aug 7th, 2005 at 10:29pm
 
I found another way using xxcopy, moving back the file types that are to be reprocessed.
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1