Got it! After hours of fiddling...
Here is the final code for anyone else who may want it. It's probably not the best but - hey - it works! The main part is a sub cos I want to expand it in the future. This is just the begining.......
'==================================================
' Move EXxxx file for re-export MH 14/07/2003
'==================================================
Move
Sub Move()
dim exFileName, fso
set fso = createobject("scripting.filesystemobject")
exFileName = inputbox("File name","Move file")
If fso.FileExists ("N:\out\" & exFileName) Then
'Move the file to parent directory for export
fso.MoveFile "n:\out\" & exFileName,"n:\" & exFileName
msgbox("File has been moved")
else
msgbox("File does not exist")
exit sub
End If
fso = nothing
exFileName = nothing
End Sub
It moves a 2k text file from a folder to the parent folder, but there are 15,000 of them, and searching isn't hard but is time consuming. This does it in a fraction that time. I do this a lot sometimes, so this is really going to help!
Matt