Link to home
Start Free TrialLog in
Avatar of Devildib
Devildib

asked on

File processing based upon priority

Hi Experts,

We have a folder 1 in a network drive.And folder 2 containing 15 different folders say f1 to f15.
Some third party sources put in files which may be upto 150 in number in a day into folder 1.
Each file is named such a way that it had destination folder name within uts name like f1p1data.csv, f3p2data.csv, f1p2data.csv etc.
Here f denotes which folder the file is to put and p denotes priority to be picked up..as in p1 to be picked up first and so on.There is this vbs ript code that runs this logic of putting files one by one into subfolders.The vbscript is present in my local.When ever a file gets picked up into subfolder say f1 for ex..an already existing file say available.txt in f1 folder changes into assigned.txt.A separate process which is scheduled, processes the file in f1(basically moves the file into my local drive and processes) and at last renames the assigned.txt to available.txt.And the process continues.Problem 1: since its  drive, moving file into subfolders is slow
Problem2: since files keep arriving in folder 1, the vbscript seems to be becoming slow in finding the priority file
Please suggest a better way of doing this and combatting the latency.Also suggest a alternate way of looping through as ..files are still getting copied into folder 1 when the vbscript is looping through to find top priority file from one iteration through all files present jn a given time.
ASKER CERTIFIED SOLUTION
Avatar of Cameron Young
Cameron Young

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Devildib
Devildib

ASKER

But will the file system watcher make difference when monitoring network drive...and help in reducing latency?