hey,
program appears to be working like a charm, can't thank yall enough. I have modifed it a bit to output to a text file for a kind of record keeping thing. What command would I throw into the batch file to have it output in the text file how many FOLDERS it moved? or is this possible? I would be happy I guess with the number of files moved if that one is possible.
Thanks guys, appreciate it.
If anyone knows off the top of thier head, I am looking around for the info now, how to setup an error log for a file not transfered to throw into the batch file that would be awesome.
Here is the file that has been compiled and modified slightly.
@echo off
cls
echo -------------------------------------------------------------------------------------------------------- >>Transfer.txt
date /t >>Transfer.txt
time /t >>Transfer.txt
echo This will transfer all folders in SCAN to the ALPHABETICAL SCANNED DOCUMENTS.
echo To stop the process CLOSE this window.
echo List of Files Moved. >>Transfer.txt
pause
setlocal enabledelayedexpansion
set Source=C:\Scanned Documents\
set Target=C:\Alphabetical Scanned Documents\
for /f "tokens=*" %%a in ('dir "%Source%" /ad /b') do (
set Current=%%a
xcopy "%Source%\%%a" "%Target%\!Current:~0,1!\%%a\" /S /D /Y /C >>Transfer.txt
)
echo End Of Copy, see Transfer.txt for list of moved files.
echo End Of Copy. >>Transfer.txt
pause
for /f "tokens=*" %%a in ('dir "%Source%" /ad /b') do (
set Current=%%a
xcopy "%Source%\%%a" "%Target%\!Current:~0,1!\%%a\" /S /D /Y /C >>Transfer.txt
If %Errorlevel%==0 (
GOTO :EOF
) else (
Echo The following file completed with %errorlevel% >> errorlog.txt
)
)