Skip to main content

How to automatically organize your desktop or a folder


  • Lets say you have a list of files in your desktop or your usb drive and you want to organize each to a different folder e.g all the mp3 files to its folder,all the text files to it folder and more 
      1.Copy the code below to and paste it to an empty notepad and save it with a .cmd extension e.g          example.cmd / config.cmd


    ---------------------CODE----------------
 echo off 

cls

set l=___________________________________
echo Config

set mp3=mp3
set txt=txt
set pdf=pdf
set jpg=jpg
set png=png
set files=files

echo %l%
echo Creating folder %mp3%
echo %l%
if  exist %mp3% (

echo The folder %mp3% was found,moving files... 
move *.mp3 %mp3% 

) else ( 
echo  The folder %mp3% does not exist,please wait...
md %mp3% 
echo %mp3% created,moving files...
move *.mp3 %mp3% 
 
)


echo %l%
echo Creating folder %txt%
echo %l%
if  exist %txt% (

echo The folder %txt% was found,moving files... 
move *.txt %txt% 

) else ( 
echo  The folder %txt% does not exist,please wait...
md %txt% 
echo %txt% created,moving files...
move *.txt %txt% 
 
)

echo %l%
echo Creating folder %pdf%
echo %l%
if  exist %pdf% (

echo The folder %pdf% was found,moving files... 
move *.pdf %pdf% 

) else ( 
echo  The folder %pdf% does not exist,please wait...
md %pdf% 
echo %pdf% created,moving files...
move *.pdf %pdf% 
 
)


echo %l%
echo Creating folder %jpg%
echo %l%
if  exist %jpg% (

echo The folder %jpg% was found,moving files... 
move *.jpg %jpg% 

) else ( 
echo  The folder %jpg% does not exist,please wait...
md %jpg% 
echo %jpg% created,moving files...
move *.jpg %jpg% 
 
)


echo %l%
echo Creating folder %png%
echo %l%
if  exist %png% (

echo The folder %png% was found,moving files... 
move *.png %png% 

) else ( 
echo  The folder %png% does not exist,please wait...
md %png% 
echo %png% created,moving files...
move *.png %png% 
 
)

echo %l%
echo Creating folder %files%
echo %l%
if  exist %files% (

echo The folder %files% was found,moving files... 
move /-y *.files %files% 

) else ( 
echo  The folder %files% does not exist,please wait...
md %files% 
echo %files% created,moving files...
move /-y *.files %files% 
 
)

echo %l%
echo Configuring...
echo %l%
:for /f %%i in ('dir /a:d') do echo %%i


pause
 


------------------ RESULTS -----------------------------



Comments

Popular posts from this blog

Zavigne

How to shutdown a computer using command

Lets say you want to sleep while watching a movie in your laptop and you want it to shut itself down in 30 minutes,an hour or any time you want,this is how you would do it.      1.Start cmd and type shutdown /f /s /t 300        -shutdown calls windows shutdown        -/f is to force the shutdown and terminate all the running applications        -/s is to specify a shutdown, you may also sleep,hibernate or restart your pc        - /t is for time in milliseconds,300 milliseconds is 5 minutes.   2.Lets say you want to abort your scheduled shutdown, just type shutdown /a   and the system will cancel automatically and notify you like this.

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