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
This will show you how to set the date in variables.
The rest is just using copy/xcopy to that folder :)
Tell me if you need more elaboration on how to do it.
Cheers!
[EDIT]: Here is the complete solution:
Create a file using notepad -> save as "something.bat" OR using CMD -> copy con something.bat (and once you're done press Ctrl-Z) And paste the following code:
@echo off
IF "%1"=="" GOTO MissingArgument
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set year=%%c
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set month=%%a
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set day=%%b
set TODAY=%month%%day%%year%
md %TODAY%
MOVE %1\*.* %TODAY%
GOTO end
:MissingArgument
echo Incorrect Syntax: Source Folder Name Required!
:end
Hope this helps!