sher19
asked on
how do i add date to my folder name/
I have this batch from expert here.
I would liek to add the date on the end of each of these folders, but it is not working for me.
please tell me the problem in my script?
setlocal enabledelayedexpansion
for %%a in (data processing audit percentages finalized) do call :process %%a
goto :eof
:process
set /p myDir=Enter the %1 folder name:
md "%mydir%_%date%"
set mydir=
I would liek to add the date on the end of each of these folders, but it is not working for me.
please tell me the problem in my script?
setlocal enabledelayedexpansion
for %%a in (data processing audit percentages finalized) do call :process %%a
goto :eof
:process
set /p myDir=Enter the %1 folder name:
md "%mydir%_%date%"
set mydir=
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Happy to help - thanx for the grade! :^)
Use this...(if echo %date% returns the 'day' for you...)
setlocal enabledelayedexpansion
for %%a in (data processing audit percentages finalized) do call :process %%a
goto :eof
:process
set /p myDir=Enter the %1 folder name:
md "%mydir%_%date:~4,2% %date:~7,2% %date:~10%"
set mydir=