Monday, December 26, 2005

How to create folders using a list of keywords from a text file and fill them with files or folders.

this is easy,
say for example you have a keywords.txt with 100 keywords inside, line by line.
say you want to create 100 folders that their name is each keyword.
say you want to copy inside a folder named "cache"
say you want to copy inside a file named "index.php"

just placethe folder somewhere exept the desktop, open a console by start--run--cmd
navigate to the directory
and run those commands

for /f "usebackq delims=" %A in ("keywords.txt") do md ".\%A"
for /f "usebackq delims=" %A in ("keywords.txt") do copy index.php ".\%A"
for /f "usebackq delims=" %A in ("keywords.txt") do md ".\%A\cache"

0 Comments:

Post a Comment

<< Home