Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I need to create a batch file that scans a directory such as c:\temp for files for each month and moves them acording to that month to a folder labled that month. I looked at xcopy commands but I cannot get the date part right. Please help.

Run this and post a few lines of the output.
=============================
@echo off & setLocal EnableDELAYedExpansionfor /f "tokens=* delims= " %%a in ('dir/b/a-d') do (
echo %%~Ta %%a
)
=====================================
Helping others achieve escape felicityM2

Thanks for the response. The script gave me a list of the files that were in the directory that I ran the script on. It listed the files with the date first [mm/dd/yyyy hh:mm am Filename]
Any thoughts? Thanks for all the help.

The concept is to post the EXACT output so we know what we're dealing with.
=====================================
Helping others achieve escape felicityM2

Sorry, I'm new at this. Here is what is says.
9/21/2009 12:41 AM desktop.ini
9/23/2009 06:00 PM test.bat

![]() |
Logitech Keyboard Hotkeys...
|
Login Script
|
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |