Skip to main content

Move a collection of files to a collection of folders with the same names


  • Let's say you have 20  people you have to create word documents for,each document with a different file name and store them in thier own folder  you have created the same name as the file.check this cmd file.
  • It read names from a file called read.txt and for each name read,it create a forlder,create a word document with that name and move this document to its folder.
  • No matter how many names,can take up to 1000 names and create files and folders in less than 30 seconds.

 1.open an mpty notepad and copy the code from the picture bellow and type it,when done save with a .cmd extension e.g hello.cmd 
2.copy or type names into an empty notepad file and save as read.txt  and place it in the same folder with a .cmd file.

Start the .cmd files and see the results,place both files in an empty folder so that the .cmd file does not interfer with the window u are working on e.g documents/desktop 





Comments

Popular posts from this blog

Zavigne

How to get your computer's information like the IP address,RAM,HDD MEMORY e.t.c

Ever been called by a technician and require your IP address or your system version 32bit,64bit etc and wondered how to get this type of information about your computer,well this is how you would get it.     1.Start cmd.exe and type systeminfo the press 'enter' and you will get all the info bout your     hardware,software etc

Simple loop in cmd

Ever wondered how to make a loop in cmd  1.start cmd.exe 2.Simple type for /l  %i in (1,1,10) do echo %i