CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11
  1. #1
    Join Date
    Nov 2009
    Posts
    6

    Unlimited (sub)Folders Comperasion (also with .doc)

    Hi everyone

    Even if Im new here, this post will be long but I hope I could please for assist or suggestion anyway. Im trying to search and contact some programmers in our country for one program that I need and probably doesn't exsist yet, but I don't know what prize should I take so we, with programmer, would be both satisfied. However since I registered here, I hope I could learn something about programming too - even if I don't know much yet, actually almost nothing. But I didn't add this topic because of asking for the prize but because of suggestion what to do...

    I would like to compare unlimited amount of folders and subfolders at the same time - no comparasion of files should be done. Before I try to say what I need, I also want to say how my folders and subfolders look like and from where do I get parts of syntax. All of my subfolders and folders (and even files) contain the names according to the online music database discogs (www.discogs.com). To show one, random example:

    http://www.discogs.com/Carl-Cox-Spac...release/195715

    The syntax of my folder is always ''Label Name''. The syntax of my subfolder is always ''[Catalog#] Name Of The Artist - Name Of The Release''. So In this example I have the folder with the name ''23rd Century Records'' and inside of it, I have the subfolder with the name ''[C23004] Carl Cox - Space Calling". Since Im talking only about comperasion between the folders and subfolders (without files), I won't mentoin files in this example - they have been designed before this comparasion need to be done and have nothing to do with this topic.

    Im buying music a lot online - usually junodownload and audiojelly, thats why I want to fix my issue.

    Now to the main part of the topic and what I expected from the software (did I want too much from it?):

    I would like to check if I already have the same release in my collection. Of course this needs to be done before saving it / them (no matter 1 or 10000) to collection which is showed here: http://img.photobucket.com/albums/v3...omperasion.jpg My music collection is inside the 7 main folders with the red color (screenshot). All of the subfolders (into those main folders) are label's names. All of the subsubfolders (as knows as folders located inside the subfolders) are releases. The new releases, that need to be checked to make sure if I already have them, are inside the green color (screenshot). On the screenshot are just examples of label names (the folder names). For example instead of label ''Another Example'' could be ''Vandit Records'' or ''Kne' Deep'' or whichever label. So those labels and releases (green color) need to be checked to the old folders (my music collection – red color). So have to be checked with subfolders (name of the labels) and if the name of the subfolders is the same (same label name) then it has to check for the same subsubfolder (release) inside – IF release already exsist.

    The second (and the last) comparasion that needs to be done is between new folders (labels – green color on the first screenshot) and the microsoft office word .doc file. The screenshot of my .doc file is here http://img.photobucket.com/albums/v3...ii/docfile.jpg Inside this file is the list (made with command prompt DIR command) of music (labels and releases) that is NOT on my hard drive. As you can see in the screenshot, only two parts (label name, release id as known as catid) need to be compared with the new folder / labels shown on the first screenshot. Also here is purpose of comparasion the same – to find and delete the same releases (inside exsactly the same label name).

    Actions when comparing:

    A1 – only checks if the same release exsist inside the same label name. If nothing found (the same release is NOT already in the ''old'' folders and also NOT in the .doc file) then it doesn't do anything.
    A2 – the subfolder (release) in the new folders (labels – majority damage of my whole music collection would be if release was deleted from old folders!!!) gets deleted from hard drive if the same release (inside the same label) is found – no matter in the old folders or in the .doc files
    A3 – in case if the release that is deleted is the only release in the folder (label) then this folder will be empty and needs to get deleted too.
    A4 – at the end of the label name, with one space also, needs to be the symbol ''(!!!!!)'' added. For example ''Something Recordings (!!!!!)''. Note the space between ''s'' and ''(''. Instead of ''s'' could be any else symbol such as a number, ''%'', ''$'' etc… This symbol says that in the .doc file the same label already exsist but not with the same release.

    Criterias when comparing (all five of them are already obvious but to be understandable more…):

    If is the same label (without the same release) inside the .doc file and if is the same label (without the same release) inside the old folders then the label (in the old folders) will have the symbol ''(!!!!!)''. Action A1 needs to be done.

    If is the same label inside the .doc file (without same release) but the same label is NOT in the old folders then Action A4 needs to be done.

    If the same label is NOT inside the .doc file but it is inside the old folders (without same release) then Action A1 needs to be done.

    If is inside the same label (no matter in the .doc file or in the old folders) also the same release then Action A2 needs to be done. Possible Action A3 remains.

    If the same label is NOT in the .doc file and also NOT in the old folders then the release doesn't even need to be checked. Action A1 needs to be done.


    When searching for same releases; Two releases are also the same if their catid (always located between ''['' and '']'') are in the relaton shown below. I took random catid (KD) from the random chosen release Kne' Deep as the random number 16 just for example. It could be anything else (above is mentoined 23rd Century Records instead of Kne' Deep and therefore of course different catid):

    KD = Kd = kd
    KD16 = KD 16
    KD016 = KD-016
    KD16 = KD-16
    KD 016 = KD-016
    KD 16 = KD-16
    KD 16 = KD – 16

    KD016 = KD0-16
    KD 016 = KD 0-16

    KD016 = KD0016
    KD016 = KD 016
    KD0016 = KD 0016
    KD16 = KD0016
    KD016 = KD 0016
    KD016 = KD 16
    KD0016 = KD 016
    KD016 = KD16
    KD0016 = KD 16

    KD-16 = KD-016
    KD-16 = KD-0016
    KD-16 = KD16
    KD-16 = KD016
    KD-16 = KD0016
    KD-16 = KD 16
    KD-16 = KD 016
    KD-16 = KD 0016

    KD0016 = KD016
    KD0016 = KD16
    KD 0016 = KD 016
    KD 0016 = KD 16

    Hopefully I showed all possible combinations.

    Besides this it can happen that exsactly the same label has two different names, for example in the case of abbreviation. The label ''FSOE Recordings'' is the same label as ''Future Sound Of Egypt Recordings''. In this situation I (already written) have the folder:

    ''FSOE Recordings (= Future Sound Of Egypt Recordings)''

    In that case the same label would be found if searching for ''FSOE Recordings'' (because of the left part) and if searching for ''Future Sound Of Egypt Recordings'' (because of the right part).

    So thats it. My question is: Am I able to do this? I know the (sub)folders comperasion could be done but Im worried about comparing the (sub)folders names with the .doc file.

    I hope I wasn't too annoying with my message. I also apologize for my English language since its not 100% correct. Hopefully someone could suggest me something how this could be done.

    Thank you and best wishes to everyone.

  2. #2
    Join Date
    Nov 2009
    Posts
    6

    Re: Unlimited (sub)Folders Comperasion (also with .doc)

    hello?

  3. #3
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: Unlimited (sub)Folders Comperasion (also with .doc)

    Your post is quite long and complex... maybe that's why nobody is responding.

    Although I understand your post, it's not really clear what you can or can't do. Is finding the files the problem.. or doing the comparing stuff .. or don't you know where to start .... or.. .. ??

  4. #4
    Join Date
    Nov 2009
    Posts
    6

    Re: Unlimited (sub)Folders Comperasion (also with .doc)

    Thank you for reply. Finding (I guess we are talking about manually searching) the files has nothing to do with this topic. The subject about which I am interested is all about using the folders and subfolders names to compare and see if they already exsist on two different location; hard drive and .doc file. Inside the .doc file I have huge list of folders that are not on hard drive so I would like to do the comparasion and find the duplicates (please note all of the combinations above mentoined are counted as duplicate too even if they are not exsactly the same) with them also.

  5. #5
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Unlimited (sub)Folders Comperasion (also with .doc)

    It's not clear if you are trying to create a program to do this or want someone else to create the program for you.

    If you are coding this problem yourself and want help, then we need to know about the details of the problem you are having. Post your source code and let us know about the specific issues - i.e. what the program is doing vs. what you would like it to do.

  6. #6
    Join Date
    Nov 2009
    Posts
    6

    Re: Unlimited (sub)Folders Comperasion (also with .doc)

    Im not a programmer at all. I have some experiences in Delphi but not enough to do such a comparasion of string lines, specially not because of the combinations that I mentoined in my first post. I also cannot program the software to access the .doc files and its text. So Im also willing to find a programmer but I haven't posted the request (yet) because I would first like to know if the software, with functions that I described, exsist already. There are tons of programs for doing the comparasion to avoid the duplicates but most of them are for comparing text files and for comparing exsactly two folders and their files inside. As I wrote above, I need to have the option to add (scan or drag & drop - doesn't matter which method) unlimited amounts of folders (with subfolders). All of them contain important files that need to stay untouched. Those folders that are added won't be compared by themself only but will need to compare them with already exsisting different, folders and their location should be chosen inside the software, also with already exsisting .doc file (screenshot of it is in my first post.
    I got one idea for the solution to this - it requires more time (comparing to the program about which im asking) so the comparasion could be done. The idea is about perfect program called ''DiffDoc''. With DiffDoc and a bit of knowledge of command prompt DIR commands, I could compare both relations:

    new folders (green color on the first screenshot) & old folders (red color on the first screenshot)
    new folders & doc file (second screenshot)

    DiffDoc is program to compare two different text (.doc) files and find the duplicates. Second file (for the first relation to get all the folders and subfolders names) would be created through DIR command in cmd. But the reasons why Im asking for the program instead of using the method which I just described are 3:

    1. I don't know how to use in comparasion only two parts of each line (there are 10000+ lines and will increase for minimum 50000) showed on second screenshot. There is no support forum for the program, also developers don't answer.
    2. I do have a bit of knowledge from command prompt but Im still not sure how to '' dir > filename.doc '' only specific folders and their subfolders showed with green mark on first screenshot. For sure not with names, there should be some other method. But typing the names of the folders (with their subfolders and subsubfolders - none of them should be included in cmd command but only 7 main folders) that should NOT be included in the DIR (filename.doc) sounds fine to me (only 7 folders to type).
    3. The main reason - I belive DiffDoc cannot be programmed (or perhaps Im wrong - adding a script in .dll??) and I need to find the duplicates in the combinations mentoined above even if they are not exsactly 100% the same. So for example if the name of the folder is exsactly the same but the symbol ''(!!!!!)'' and one space between last letter of the folder name and ''('' must be overlooked ( ! ) on the method described in my first post then it should find (in the subfolder name between ''['' and '']'') the duplicate as an example ''KT016'' is the same as ''KT-16'', even if it doesn't look exactly the same. And returns the result as a duplicate. More combinations are also in the first post.

  7. #7
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Unlimited (sub)Folders Comperasion (also with .doc)

    We're are a forum to help answer questions specific to Visual C++.

    If you are asking a question about C++, you are in the right place.

    It seems that you have questions related to an app called DiffDoc. Unfortunately this isn't C++ related.

    I'll move this to the general forum. Perhaps someone there has knowledge of DiffDoc.

  8. #8
    Join Date
    Nov 2009
    Posts
    6

    Re: Unlimited (sub)Folders Comperasion (also with .doc)

    Arjay the main topic is related to C++ so I guess I added it on correct place. I mentoined diffdoc because it is one of the reason (diffdoc is not able to do what i need) why im searching the new program - its functions i described in my post. I was just saying about the reasons why i need new program or request for one in case if it doesn't exsist already. Sorry about misunderstanding.

  9. #9
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Unlimited (sub)Folders Comperasion (also with .doc)

    I'm not trying to be difficult, but I'm not sure what you are looking for.

    Are you looking for a programmer to code an application for you?

    Are you asking for help with the DiffDoc program?

  10. #10
    Join Date
    Nov 2009
    Posts
    6

    Re: Unlimited (sub)Folders Comperasion (also with .doc)

    I wanted to ask if the program with the same function(s) exsist already. I couldn't find it on google. If not, I would please for a programmer.
    DiffDoc was one of the reasons why Im searching for the (new) program, even if around 60% (if not a bit more) of requirements could be done through it.

  11. #11
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Unlimited (sub)Folders Comperasion (also with .doc)

    Since you are looking for a programmer, you may try to post in the jobs forum.

    As far as the diffdoc program doing 60% of what you need. Generally, most programs aren't built for extensibility in mind. So even if you have an existing program, unless you have the source code, you usually can't incorporate its functionality into your program. Sure, sometimes you can create a wrapper around an existing program, but these sorts of hacks are usually unreliable and difficult to maintain.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured