I need a script to automate file moving according to its names rules (II)

I need a vbs script to make the following - inside a directory I have many files which have a similar name (only the 2 last characters are different - for example aaaa10, aaaa11, aaaa12, aaaa13; bbbb10, bbbb12, bbbb13, bbbb14). I need an automatic way to move that group of files that only have the 2 last characters different to a sub-directory with the name corresponding to common characters (for example, for aaaa10, aaaa12, aaaa13, aaaa14 it will create a sub-directory named aaaa, and aaaa10, aaaa12, aaaa13, aaaa14 will be moved inside aaaa). Can you understand what I want ? I do not know to program :( My operating system is Windows XP. If you look at http://www.experts-exchange.com/Programming/Q_21812622.html you can see I have posted a similar question but the difference was only the last character... Just modify that vbs script... I wish I know to program !... Now I have no free time but in future I will learn VB ! Thanks.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

asgarcymedAuthor Commented:
*) It is always two characters that are different at the end of the filenames;
*) The common part of the names is variable (not always 4 as I used in the example);
*) All the files are in the same folder at the same level (no recurse into subfolders needed);
*) I want the new sub directory in the same folder as the file.
Change this line:

    baseName = Left(file.Name, Len(file.Name) - 5)


    baseName = Left(file.Name, Len(file.Name) - 6)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:

Study the code asgarcymed.  Now is a great time to start learning!

You can find documentation on the language here:

And documention for the File System Object classes here:
asgarcymedAuthor Commented:
vinnyd79 - That's it, thank you a lot !
asgarcymedAuthor Commented:
Idle_Mind  - thank your for the advices and links !
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.