Path = Wscript.Arguments(0) Path2 = Wscript.Arguments(1) on error resume next error = 0 Set fso = CreateObject("Scripting.FileSystemObject") Set Folder = fso.GetFolder(Path) wscript.echo "move Files and Folders from " & Path & " to " & Path2 'move files For Each file In Folder.files wscript.echo file file2= Path2 & file fso.MoveFile file,Path2 & "\" if Err.Number = 0 then wscript.echo "OK" else wscript.echo "error" error = 1 end if Next 'move folders: For Each Folder In Folder.SubFolders wscript.echo Folder fso.MoveFolder Folder,Path2 & "\" if Err.Number = 0 then wscript.echo "OK" else wscript.echo "error" error = 1 end if Next set Folder = nothing: set fso = nothing if error = 0 then WScript.Quit(0) if error = 1 then WScript.Quit(1)