Save as move_to_folder.vbs
Code: Select all
'FileWatcher script - move files to a new folder
Option Explicit
dim objArgs
dim fso
dim filename
dim folder
Set fso = CreateObject("Scripting.FileSystemObject")
'Set a reference to the arguments
Set objArgs = Wscript.Arguments
for each filename in objArgs
If fso.FileExists( filename ) Then
fso.MoveFile filename, "c:\destfolder\"
End If
next
Set fso = Nothing
Set objArgs = Nothing
Parameters: <full path\>move_to_folder.vbs %FILE%