search old name in list
Posted: 28 Mar 2011 08:39
Hi folks,
I have this new issue.
tree directory:
C:\a
C:\b
C:\c
a lot of file arrive on directory c:\a
every 5 minutes start a bat that do this operation:
1 ) move file from a to b (move c:\a\* c:\b)
2) other process..................
3) move file from b to c (move c:\b\* c:\c)
sometimes some process in step 2 terminate in error, and in directory c:\b the file remain forever.
I like to do write this code for check:
dir /b c:\b\* > list_new.txt
move c:\a\* c:\b\
dir /b c:\b > list.txt
new code to write
for every line in list_new.txt check if already exist in list.txt and send a warning
Regards
I have this new issue.
tree directory:
C:\a
C:\b
C:\c
a lot of file arrive on directory c:\a
every 5 minutes start a bat that do this operation:
1 ) move file from a to b (move c:\a\* c:\b)
2) other process..................
3) move file from b to c (move c:\b\* c:\c)
sometimes some process in step 2 terminate in error, and in directory c:\b the file remain forever.
I like to do write this code for check:
dir /b c:\b\* > list_new.txt
move c:\a\* c:\b\
dir /b c:\b > list.txt
new code to write
for every line in list_new.txt check if already exist in list.txt and send a warning
Regards