I need to make fivewin accept names of directories from tje user using and also encrypt the exe file generated .
Will I use the run command for each statement or there is another windows way.
Thanks
- Code: Select all Expand view RUN
@echo off
set limit=1000
set count=0
set DirName=1
::set source=F:\etisalat\batches\data
::set newlocation=F:\etisalat\batches\new
::set source=D:\etisalat\data
::set new=D:\etisalat\new
@cls
echo.
echo.
set /p source="Source directory of Input :"
set /p newlocation="Destination directory of Output :"
set /p limit="Number of files in each directory :"
set /p sortchr="Select files starting with certain character:"
if not exist "%newlocation%" md "%newlocation%"
setlocal enabledelayedexpansion
echo %source%
dir /b "%source%\%sortchr%*.*" | sort /+1 > %newlocation%\dir.txt
echo Moving files from "%Source%" to "%newlocation%\%DirName%"
for /F "tokens=*" %%* in (%newlocation%\dir.txt) do (
if not exist "%Source%\!DirName!" md "%newlocation%\!DirName!"
move "%Source%\%%*" "%newlocation%\!DirName!"
:: if not exist "%Source%\!DirName!" echo md "%newlocation%\!DirName!"
:: echo move "%Source%\%%*" "%newlocation%\!DirName!"
set /a count=!count! + 1
if !count! GEQ %limit% (
set count=0
set /a DirName=!DirName! + 1
)
)
echo Moving files from "%Source%" to "%newlocation%\!DirName!"
::del %newlocation%\dir.txt