directory_copy
NOTE: Relies on XCOPY, a shell utility common to most installations of Windows.
/*
** Usage:
** directory_copy(dirname,newname,prompt)
**
** Arguments:
** dirname directory to copy, string
** newname directory to create, string
** prompt if true, ask before overwriting files
**
** Returns:
** nothing
**
** GMLscripts.com
*/
{
var xcopy_arg_string;
if (!directory_exists(string(argument1))) {
directory_create(string(argument1));
}
xcopy_arg_string = '"'+argument0+'" "'+argument1+'" /Q /H /K /R';
if (argument2) xcopy_arg_string += ' /-Y'
else xcopy_arg_string += ' /Y';
execute_shell('xcopy',xcopy_arg_string);
}
** Usage:
** directory_copy(dirname,newname,prompt)
**
** Arguments:
** dirname directory to copy, string
** newname directory to create, string
** prompt if true, ask before overwriting files
**
** Returns:
** nothing
**
** GMLscripts.com
*/
{
var xcopy_arg_string;
if (!directory_exists(string(argument1))) {
directory_create(string(argument1));
}
xcopy_arg_string = '"'+argument0+'" "'+argument1+'" /Q /H /K /R';
if (argument2) xcopy_arg_string += ' /-Y'
else xcopy_arg_string += ' /Y';
execute_shell('xcopy',xcopy_arg_string);
}
[Please Login]
Projects: 2
Contributor: Leif902
comments powered by Disqus

Related: directory_copy,