Jump to content

Need Help with File Copy GUI Script


Solgrmonk
 Share

Recommended Posts

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!

Link to comment
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.

Link to comment
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.
Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...