Sort Group of Files into Directories(repost)(repost)
$25-30 USD
Cancelado
Publicado há quase 12 anos
$25-30 USD
Pago na entrega
A large group of files sits in one directory and needs to be moved and divided into multiple folders.
## Deliverables
Program Description:
You will have a directory of .flv files. There are files with prefixes. I think it's better if the program works by just finding prefixes and acting accordingly rather than searching for specific prefixes, that way the program is more future proof in case I start using new prefixes or stop using old ones.
The prefix is immediately followed by a 3 digit number. Generally starting at 001 and generally maxing out at 025. But some will max out at 009 or 008
The program simply needs have appropriate variables for the following:
-directory of files
-root directory of where files will go
-start date (folders should be named by date starting at this date)
The program will then search through the directory of files and grab one of each and move them into each dated folder.
As an example the directory of files contains the following
jl001-*.flv 10 files
jl002-*.flv 10 files
jl003-*.flv 10 files
js001-*.flv 10 files
js002-*.flv 10 files
js003-*.flv 10 files
jmilf001-*.flv 10 files
jmilf002-*.flv 10 files
directory 01-21 should receive 1 jl001-*.flv 1 jl002-*.flv 1 jl003-*.flv 1 js001-*.flv 1 js002-*.flv 1 js003-*.flv 1 jmilf001-*.flv 1 jmilf002
directory 01-22-*.flv should receive 1 jl001-*.flv 1 jl002-*.flv 1 jl003-*.flv 1 js001-*.flv 1 js002-*.flv 1 js003-*.flv 1 jmilf001-*.flv 1 jmilf002-*.flv
etc.
You may run up against cases where there are
jl001-*.flv 9 files
jl002-*.flv 7 files
jl003-*.flv 10 files
js001-*.flv 8 files
js002-*.flv 2 files
js003-*.flv 13 files
jmilf001-*.flv 11 files
jmilf002-*.flv 10 files
Something like this. In this case simply divide the same way but the folders towards the end will receive less files. But all files should be moved regardless. So the 13th folder will have 1 file js003-*.flv.
*added: please sort files randomly into directories rather than alphabetically.