Sign in to follow this  
Followers 0
Solgrmonk

Need Help with File Copy GUI Script

5 posts in this topic

Hello, I am new to AutoIT and I want to ask for some help with something I am trying to do.

I need to be able to copy a single or multiple files contained in a source directory to all of the folders in a target directory.

I need to do the following;

Ask user for a Source directory

Ask User for a Target directory

Copy files from Source directory to Target directory and Sub Folders in Target Directory.

Any help provided is GREATLY appreciated!

Share this post


Link to post
Share on other sites



Hello, I am new to AutoIT and I want to ask for some help with something I am trying to do.

I need to be able to copy a single or multiple files contained in a source directory to all of the folders in a target directory.

I need to do the following;

Ask user for a Source directory

Ask User for a Target directory

Copy files from Source directory to Target directory and Sub Folders in Target Directory.

Any help provided is GREATLY appreciated!

#include <Process.au3>
$SOURCE = FileSelectFolder("SOURCE","")
If @error Then Exit
$DEST = FileSelectFolder("DESTINATION","",1)
If @error Then Exit
_RunDOS('xcopy "' & $SOURCE & '" "' & $DEST & '" /E')

When the words fail... music speaks

Share this post


Link to post
Share on other sites

#include <Process.au3>
$SOURCE = FileSelectFolder("SOURCE","")
If @error Then Exit
$DEST = FileSelectFolder("DESTINATION","",1)
If @error Then Exit
_RunDOS('xcopy "' & $SOURCE & '" "' & $DEST & '" /E')
Thanks for the quick reply. I tried this script, but it only copied to the destination folder, not the sub-folders in the destination folder.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thanks for the quick reply. I tried this script, but it only copied to the destination folder, not the sub-folders in the destination folder.

Use _FileListToArrayEx() function by SmOke_N to get all subdirs.

Or use DirCopy() function.

Edited by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0