I have a number of files in a folder that are named as numbers like 1, 2, 3, 4, 5, 6, etc. I also have a text file in the same folder that identifies each of these numbered files and gives their path location. The text files looks like this:

1 C:\system\Apps\file1.exe
2 C:\system\Apps\file2.exe
3 C:\system\Data\file3.exe
4 C:\system\Data\file4.exe

I need a script that would take this text file and create the correct file directory structure. So in my example, the text file would be taken and then two folders would be created, Apps and Data. 1 and 2 would be placed in Apps and 3 and 4 would be placed in Data. And also 1 should be renamed as file1.exe, 2 should be renamed as file2.exe, etc.

Is this possible to do? I have no experience with scripting and do not even know where to start. I have a lot of files that need to be sorted like this and thought it might be faster using a script than doing it by hand. Any help is appreciated. Thanks.