New_Folder_dev.bat 465 B

123456789101112131415
  1. @echo off
  2. REM Prompt user to input folder name
  3. set /p folderName=Enter the name of the folder:
  4. REM Create the folder
  5. mkdir %folderName%
  6. REM Get current date and time
  7. for /f "tokens=2 delims==" %%G in ('wmic os get localdatetime /value') do set "currentDateTime=%%G"
  8. set currentDateTime=%currentDateTime:~0,8%-%currentDateTime:~8,6%
  9. REM Create text file with folder name with current date and time as title
  10. echo %folderName% > %folderName%\%currentDateTime%.txt