Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 9673

Windows: Create named subfolders using a list, then move folders containing files to the appropriate subfolder based on folder (w/files) name [closed]

$
0
0

The best way I can explain my question is by giving an example. Let's say that I have two main folders that I'd like to populate with subfolders. These two main folders are called "Duplicates" and "Unique."

I have a text-based list of Duplicates that looks something like this "LL 1, 2, 4, 5, 6; LL 3, 8, 22, 47; LL 18, 12, 31; ..." I would like to use this list to create subfolders within the Duplicate folder.

Duplicates      LL 1, 2, 4, 5, 6      LL 3, 8, 22, 47      LL 18, 12, 31      ...

Then, in another location, I have folders containing files for each LL #. The folders are labeled as such "LL # - XX.XX.XXXX" where "XX.XX.XXXX" is a date. I would like the script to be able to identify if the LL #'s match and move the folder containing the files to the appropriate subfolder within the Duplicates folder.

So for example:

Duplicates      LL 1, 2, 4, 5, 6            LL 1 - XX.XX.XXXX            LL 2 - XX.XX.XXXX            LL 4 - XX.XX.XXXX            LL 5 - XX.XX.XXXX            LL 6 - XX.XX.XXXX      LL 3, 8, 22, 47            LL 3 - XX.XX.XXXX            LL 8 - XX.XX.XXXX            LL 22 - XX.XX.XXXX            LL 47 - XX.XX.XXXX      LL 18, 12, 31            LL 18 - XX.XX.XXXX            LL 12 - XX.XX.XXXX            LL 31 - XX.XX.XXXX      ...

Then, for the Unique folder, I have another list of Unique values that looks something like "LL 7; LL 9; LL 10; ..." I would like to populate the "Unique" folder with the appropriate matching file-containing folder.

Unique      LL 7 - XX.XX.XXXX      LL 9 - XX.XX.XXXX      LL 10 - XX.XX.XXXX      ...

So, all in all, I'd like it to look something like this:

Duplicates      LL 1, 2, 4, 5, 6            LL 1 - XX.XX.XXXX            LL 2 - XX.XX.XXXX            LL 4 - XX.XX.XXXX            LL 5 - XX.XX.XXXX            LL 6 - XX.XX.XXXX      LL 3, 8, 22, 47            LL 3 - XX.XX.XXXX            LL 8 - XX.XX.XXXX            LL 22 - XX.XX.XXXX            LL 47 - XX.XX.XXXX      LL 18, 12, 31            LL 18 - XX.XX.XXXX            LL 12 - XX.XX.XXXX            LL 31 - XX.XX.XXXX      ...Unique      LL 7 - XX.XX.XXXX      LL 9 - XX.XX.XXXX      LL 10 - XX.XX.XXXX      ...

How might I go about doing this?


Viewing all articles
Browse latest Browse all 9673

Trending Articles