Help moving files from many folders into just one folder

Discussion in 'PC and I.T support/Advice posts' started by mapleleaf, Jun 26, 2011.

  1. mapleleaf

    mapleleaf MB Enthusiast

    Messages:
    1,694
    Joined:
    Dec 4, 2002
    Location:
    Manchester
    Car:
    2018 Gle 43 AMG Night - replaced previous 2015 E63 AMG
    Hi all

    I am looking for some help please with the following with my windows system- I'm looking to export data to a new database with a different file structure. Filed mapping is fairly straightforward but handling attached documents is giving me a headache...

    many thanks in advance .....

    My database (sybase) stores documents outside the database and links to them. The database links to 5 category folders ( eg Clients, suppliers, events etc ) and each contains many sub folders that are numbered such that the last folder in the group contains documents. Each document ( word, pdf etc) has a unique reference number generated by the database and is prefixed by the client number so all documents for the same client are grouped together. The file structure is related to the client number, so for example document files relating to client 0110667 are found in this folder structure :-

    CLIENT\01\10\66 and in the 66 folder are 10 sets of client documents for the following client ref numbers.. 0110660 to 0110669.

    So in my example above I have 2 uniquely named documents .. 1 word and 1 pdf ( in the prefix the leading zero is dropped)

    110667.134721.doc
    110667.137775.pdf

    What I am trying to do is extract all of these unique document files from the dozens of subfolders into one large master folder. There are too many folders to do this manually and I wondered if there was some batch file code or other script that some one could help me write to automate the process that would systematically work its way through each folder until it found files ( not every folder has files in them) and copy what it finds into One master folder. There are only document files in the last folder of the structure that drills down to each group of 10 client numbers in question

    The whole structure is as follows - I hope what I'm trying to put across is clear :confused:

    CLIENT\
    01\
    02\
    .
    .
    .
    99\

    CLIENT\01\00\
    01\
    02 \ to 11

    CLIENT\01\00\01\
    02\ to 99


    cheers.
     
  2. Deker

    Deker Active Member

    Messages:
    167
    Joined:
    Apr 1, 2007
    Location:
    Hartlepool
    Car:
    2012 3ltr Jaguar XFS
    Which operating system are you using to attempt this?

    If it's windows I have a script that should do it for you
     
    Last edited: Jun 26, 2011
    1 person likes this.
  3. OP
    OP
    mapleleaf

    mapleleaf MB Enthusiast

    Messages:
    1,694
    Joined:
    Dec 4, 2002
    Location:
    Manchester
    Car:
    2018 Gle 43 AMG Night - replaced previous 2015 E63 AMG
    Its windows XP sp3... & thanks for the PM I'll give it try
     
  4. John

    John Hardcore MB Enthusiast

    Messages:
    12,184
    Joined:
    Mar 3, 2011
    Location:
    Daan Saaf
    Car:
    I wish.
    If I understood your requirements right, I would have thought you could use Search and search from the top level without specifying anything - this would then find all files underneath.

    You could then copy them all from within the results and paste them where you want them in your master folder file...
     
  5. OP
    OP
    mapleleaf

    mapleleaf MB Enthusiast

    Messages:
    1,694
    Joined:
    Dec 4, 2002
    Location:
    Manchester
    Car:
    2018 Gle 43 AMG Night - replaced previous 2015 E63 AMG
    thanks JohnEboy
    I'm not to familiar with running scripts. to be honest your suggestion does seem more user friendly and I hadn't thought of that .. just tried & it does give me the result I needed cheers :)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.