Hi Glenn,

i had no time the last days - business trip and other stuff to do, sorry about the late reply.
The moving command wasn't working correct, whatever i tried.
It copies very well without deleting, but when i arm the delete-command, it copies not in the same matter.
Maybe it should do it one by one, copy the file and then remove it from the source, not all together.
I guess there cold be an option with a Fore Each loop?
Here is what i have atm( i mean, what you did ). \:\)
 Code:
Break On

:Search
"Searching " ?

DIM $SPath,$SFile								; reset the $Vars

$aMonate = Split(' ,JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC', ',') 	; Month in an Array (just set the "X" to " " for testing) 

$SPath = 'c:\Testing\'								; Source
$DPath = 'C:\t2\'								; Target



$File = Dir($SPath + '*.*') 
 	
; get first file name

  While Not @ERROR  		

  $FileDate  = GetFileTime($File)
  $FileYear  = SubStr($FileDate,1,4)
  $FileMonth = $aMonate[Val(SubStr($FileDate, 6, 2))]
  $FileDay   = Right('0'+SubStr($FileDate,9,2),2)
  ; $TypeFound = 0

  $DstDir = $DPath + $FileYear + '\' + $FileMonth + '\' + $FileDay

  If Not Exist($DstDir)
    	; 'MD ' $DstDir ?							; for debugging
    	MD $DstDir								; creating target des
  EndIf

  SLEEP 1									; slowing down for checkinhg
    
  If Exist($File) "Copying " $SPath + $File ?	   
 	  ; copying or moving the files to the target des
 	  ; Move ' $Path + $File + ' ' + $DstDir				; for debugging					
 	    Copy $SPath + $File $DstDir 					; copy the files into the target des
	  ; Move $SPath + $File $DstDir						; move the files into the target des
  	Else 
	GOTO "Search"
  EndIf 	

  SLEEP 1

  
  ; DEL $SPath + $File 								; delete the files from the source des
  ; "deleting " $SPath + $File ?
  							
 	  						
   
  $File = Dir()									; get the next file
					 

Loop




Thank you once more Glenn for your patience with a noob like me.

Buhli


Edited by Buhli (2012-10-16 12:24 PM)