make batch file that creates a folder with today's date then moves files from a folder in to that newly created folder

前端 未结 6 1029
抹茶落季
抹茶落季 2021-01-06 09:56

I need to make a batch file that will make a folder with today\'s date in month day year format (example 080112). Then once it\'s created i need to move files from a set fol

6条回答
  •  难免孤独
    2021-01-06 10:35

    set TODAY=%date:~10,4%%date:~7,2%%date:~4,2%
    

    is an alternative way to get the date part into a shell variable

    from: http://stevesgeekspeak.com/2010/01/howto-get-variable-substrings-in-batcmd-scripts/

    Jony ... FTW, of course, for having the whole answer.

提交回复
热议问题