Speeding up my web processes

Discussion in 'Programming' started by chrisj, Aug 4, 2008.

  1. #1
    I'm creating a web site where uploaded english documents get automatically converted to another language. I'm using an inexpensive language converter program and an upload script. All files get uploaded to the Upload Folder. And I'm using a basic command script to send the uploaded documents from the Upload Folder to four separate copies of the language converter programs (so that four documents can be converted simealtaneously).

    The command script is this:

    
    :TOP
    "C:\Program Files\File Mover\File Mover.exe" /showstatus /noerrors /file "C:\Upload Folder\*.txt|/filter move 0 "C:\FolderA\" ""
    
    sleep 5
    
    "C:\Program Files\File Mover\File Mover.exe" /showstatus /noerrors /file "C:\Upload Folder\*.txt|/filter move 0 "C:\FolderB\" ""
    
    sleep 5
    
    "C:\Program Files\File Mover\File Mover.exe" /showstatus /noerrors /file "C:\Upload Folder\*.txt*|/filter move 0 "C:\FolderC\" ""
    
    sleep 5
    
    "C:\Program Files\File Mover\File Mover.exe" /showstatus /noerrors /file "C:\Upload Folder\*.txt|/filter move 0 "C:\FolderD\" ""
    
    Sleep 5
    
    GOTO TOP
    Code (markup):

    Language Converter Program 1 grabs the files from FolderA
    Language Converter Program 2 grabs the files from FolderB
    Language Converter Program 3 grabs the files from FolderC
    Language Converter Program 4 grabs the files from FolderD

    I know this is a very simplistic way of doing things, but my coding knowledge is very limited. This all talkes place on a Windows server.

    The problem I'm looking to solve is that if there are many files in the Upload Folder, the command script will grab all the files, thus many files will be in line waiting to be converted in Folder A, for example, and no files will be in Folders, B, C & D, therefore defeating the pupose of having all these folders so that files can be converted simealtaneously, instead of one at a time.

    How can I set up the command file to so that any files in the Upload Folder can get sorted among FoldersA, B, C & D equally, thus insuring simealtaenous conversion, therefore speeding up my web site processes? Or any other ideas will be appreciated.
     
    chrisj, Aug 4, 2008 IP