Computing.Net > Forums > Windows XP > batch file to move folder from a DB

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

batch file to move folder from a DB

Reply to Message Icon

Name: Stratovarius
Date: March 6, 2008 at 11:27:06 Pacific
OS: XP
CPU/Ram: 3800+ 1GB
Product: ACER
Comment:

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-3

and 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



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: March 6, 2008 at 13:50:56 Pacific
Reply:

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


0

Response Number 2
Name: Stratovarius
Date: March 6, 2008 at 18:54:51 Pacific
Reply:

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-hjyg

activating 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 foldersomething345

and 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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


User Account Problems Goes in standby once not ...



Post Locked

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


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: batch file to move folder from a DB

batch file to move multiple files to new fold www.computing.net/answers/windows-xp/batch-file-to-move-multiple-files-to-new-fold/175836.html

Batch File to move columns in a txt file www.computing.net/answers/windows-xp/batch-file-to-move-columns-in-a-txt-file/178639.html

DOS bat file to MOVE files w prompt www.computing.net/answers/windows-xp/dos-bat-file-to-move-files-w-prompt/168138.html