Results 1 to 2 of 2
  1. #1
    Xdj is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Dec 2017
    Posts
    1

    Creating a Search or Query for Data Backups ***Newbie***

    Hello All,

    Please excuse my ignorance of MS Access but I've been trying to organize my backups and I thought ms access would be great to use...big mistake! After 5 hours of trying to figure things out I could have done it manually.
    So, I'm committed now and would really appreciate any help to figure out how to do what I'm trying to do!
    Ok, here it goes: I'm a stickler for backing up my system, I was in the IT industry for 20+ years and have seen many a person break down in tears because they had lost all their data because of a hardware crash and no backups. I on the other hand, over do it and do not do a good job of organizing my backups. I have 15 drives with multiple copies of my data, majority are photos and video (I'm an amateur sports photographer) so it's time to consolidate my backups.
    Sorry, I got off topic...Basically I want to know where my backups are over the 15 drives. I know there's going to be at least 3 copies if not 4 or 5 copies of my data so I want to search (I guess query) the 15 columns of folders and files I have listed in MS Excel and use that info for Access.


    So, I have 15 columns with all the files and folders listed under the name of the drives in a worksheet. I would like some how to query all the drives and have a list with the folder/file name and what drives they are on. Example: MyDocs happen to be on Drive A,C,D, and X so the query should output something like MyDocs - Drives, A C D X; Basketball Pics - Drives B C P X and so on.
    I'm not sure of the output layout, but something that shows the folder/file names and the corresponding drive it is on.
    It sounds like an inventory query but I just could not get anything to work. Even the duplicator function in MS Access could not find duplicates...which I know there is.
    Well, I think that's it. Thank you in advance for your help. Cheers

  2. #2
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Welcome to the forum....


    Sounds like a fun project. Do you have a dB started?

    In command prompt, you can use commands like
    cd c:\ 'switch to c drive
    dir /s/a-d-h /n/tw/oe > dirTest.txt

    to list all files to a text file. Then it would be a matter of some VBA to read the lines in the text file, check the extension to see if it was a file you wanted to save in the dB. If it was a file to save, parse out the path and maybe the last written date/time, then append to the tables.

    Could maybe use a batch file with 15 commands to list (append) files for each drive
    It might look like

    dir C:\ /s/a-d-h /n/tw/oe > dirTest.txt
    dir D:\ /s/a-d-h /n/tw/oe >> dirTest.txt
    dir E:\ /s/a-d-h /n/tw/oe >> dirTest.txt
    .
    .
    .
    dir X:\ /s/a-d-h /n/tw/oe >> dirTest.txt


    The ">>" is the DOS append redirector. (see http://www.lagmonster.org/docs/DOS7/pipes.html#pipe)


    Maybe a table with fields for drive and path and a table for file name, last written date/time..

    The time intensive part would be writing the code......


Please reply to this thread with any new information or opinions.

Similar Threads

  1. Database Backups
    By csmith in forum Access
    Replies: 5
    Last Post: 09-22-2016, 07:48 AM
  2. Replies: 8
    Last Post: 11-10-2015, 08:50 AM
  3. Replies: 5
    Last Post: 01-24-2015, 11:49 AM
  4. (How) Creating an Actual SEARCH Query?
    By ndb in forum Queries
    Replies: 3
    Last Post: 12-09-2013, 09:16 AM
  5. Creating a Search Form using query
    By sam.eade in forum Queries
    Replies: 2
    Last Post: 09-07-2013, 03:55 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums