Changeset 1126 for TI01-discovery/trunk


Ignore:
Timestamp:
07/06/06 14:50:07 (13 years ago)
Author:
selatham
Message:

more stuff for mass file handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/trunk/ingestAutomation/OAIBatch/oai_ingest.py

    r1121 r1126  
    9090# Create/clear the directory for the processing copy of the difs. 
    9191if os.path.isdir("/usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery"): 
    92     commandline = "rm -f /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/*" 
     92    commandline = "ls -1 /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/ | xargs -i rm -f {\}" 
    9393    print "Executing : " + commandline 
    9494    status = os.system(commandline) 
     
    140140# 
    141141#Once the pre-processing has finished remove the originals from the discovery directory: 
    142 commandline = "ls -1 usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/oai* | xargs -i rm usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/{\}" 
     142commandline = "ls -1 /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/oai* | xargs -i rm /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/{\}" 
    143143print "Executing : " + commandline 
    144144status = os.system(commandline) 
     
    173173if status !=0: 
    174174    sys.exit("Failed at creating backup directory %s" %this_backupdir) 
     175 
    175176commandline = "ls -1 /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/ | xargs -i cp /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/{\} " + this_backupdir 
    176177print "Executing : " + commandline 
     
    180181         
    181182#Clear out the original harvest records area 
    182 commandline = "ls -1 " + harvest_home + " | xargs -i rm -f {\}" 
     183commandline = "ls -1 " + harvest_home + " | xargs -i rm -f " + harvest_home + "{\}" 
    183184print "Executing : " + commandline 
    184185status = os.system(commandline) 
Note: See TracChangeset for help on using the changeset viewer.