Link to home
Start Free TrialLog in
Avatar of elwayisgod
elwayisgodFlag for United States of America

asked on

Copy files in a directory NOT the entire folder possible?

Can I easily have the code change to just copy all files in the directory and not copy the entire folder which includes sub folders that I don't want copied.  Want to keep it VB Script.

      objFSO.CopyFolder SOURCEDIR & "\Data", TARGETDIR & "\", True
Avatar of Qlemo
Flag of Germany image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of elwayisgod


If target files exist will it overwrite them automatically with no pop ups?
Yes, that is what the True is for.
So I thought the True was for the script to wait until this part is done before continuing.  I guess not :)  Anyways, this will process before it continues on down the main script?
Yes, the copy has to be finished first before the command will return execution to your code.