Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
ok,i already posted this few days ago, still no answers :(
i have a very large (about 11000 lines) database in a .txt file that looks like that:
foldersomething1\sub_folders-1
foldersomething1\sub_folders-2
foldersomething1\sub_folders-3
foldersomething2\sub_folders-1
foldersomething2\sub_folders-2
foldersomething2\sub_folders-3and so on.. sub_folders-* can be up to infinity, and foldersomething* too. ALSO when ill use the .bat it is possible that many of these sub_folders-* doesnt not exist, and it is possible that many of the foldersomething* are not already created. I'm using this to classify many folders (sub_folders-*) to given grouping folders (foldersomething*)
actually id like to make a quick batch file that would move all the sub_folders-* to the foldersomething*.
i tought that i could use notepad and use the replace all function to write something like MOVE subfolder* foldersomething*
but since that the foldersomething* is in front of the subfolder* (in the text file) it isnt really possible to do it that way. i'm looking for something that would read the external .txt database OR a batch file created with the .txt file itself.
something that would read the name of the folder after the \ and move it to the folder before the \
let me know if him not really clear, but this is almost the best i could say about it.
THANKS IN ADVANCE :D
hmmm i like it

Not clear.
In this case:
foldersomething1\sub_folders-1
sub_folders-1
is in:
foldersomething1
So where does it need to move to?
=====================================
If at first you don't succeed, you're about average.M2

actually all the possible sub_folders-* included in the database are in a root folder all mixed-up, but i want them to be moved to their proper foldersomething* wich is determinated by the .txt database that looks like that:
database.txt =
foldersomething767\sub_folders-hgfh
foldersomething563\sub_folders-fhdh
foldersomething567\sub_folders-llll
foldersomething345\sub_folders-56er
foldersomething769\sub_folders-jolh
foldersomething890\sub_folders-sbht
foldersomething767\sub_folders-hjygactivating the .batch file do something like:
move sub_folders-hgfh foldersomething767
move sub_folders-fhdh foldersomething563
move sub_folders-llll foldersomething567
move sub_folders-56er foldersomething345and like that until the 11 000th line...
the batch file would read each line of the database and selecting the 2nd variable after the \ (ie: sub_folders-hgfh) and move it to the first variable before the \ (foldersomething767) in the same line:foldersomething767\sub_folders-hgfh
let me know if i'm not clear enough... i do my best, english is not my mother language
thanks for the look
hmmm i like it

![]() |
User Account Problems
|
Goes in standby once not ...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |