Windows - How to copy files to folders using bat file, Windows script to move files using batch file

How to copy files to folders using bat file

Copy files from one folder to another using .BAT file

The batch or .bat file is used to run the sequence of commands in windows from command prompt. The batch files are executed from command prompt. The following windows script will move the files from one location to the other.


Script to move the batch file from one location to the other
@echo off

set /p name=enter folder:

echo %name%

mkdir %name%

move mail\* %name%\ [To move the files from the folder to %name%]

::set /a counter=0

:::numbers

::set /a counter=%counter%+1

::if %counter% ==50 (goto :eof) else (rename )

::goto :numbers
save the script as copy.bat

just execute the batch file from command prompt.
    D:\honey\> copy.bat

In the above script you have to specify the folder name where the files has tobe moved.

set /p name=folder name

This will move the files from one location to other. This script is not a test one. Have a try and send us mail regarding the windows script.


The topic on Windows - How to copy files to folders using bat file is posted by - Honey

Hope you have enjoyed, Windows - How to copy files to folders using bat fileThanks for your time

Tech Bluff