Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Move certain extensions to another folder

Status
Not open for further replies.

marthy99

Technical User
May 28, 2015
3
NL
hi all i wanna make a script that can search a specific folder for lets say all exe files and then move them to another folder only problem is i duno where to start any help ?
 
i duno where to start
Have a look at FileSystemObject

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Start with some pseudo code like this.

Code:
'Set a variable for the directory to be searched.
'Create the File System Object (objFSO)
'Bind to the folder using objFSO.GetFolder
'Enumerate files using .Files property of the folder
'Use the .Type property in an If statement to check if an exe and move the file

I hope that helps.

Regards,

Mark

No trees were harmed in posting this message, however a significant number of electrons were terribly inconvenienced.

Check out my scripting solutions at
Work SMARTER not HARDER.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top