Odcl_FolderSync

(From ODCL_LM file)

<< Click to Display Table of Contents >>

Navigation:  ObjectDCL > Free Extra Lisp function > Files & Folders >

Odcl_FolderSync

(From ODCL_LM file)

Previous pageReturn to chapter overviewNext page

Odcl_FolderSync

This function will synchronize Folders and subfolders..

Based on XCOPY function with all it parameters.

 

/w : Displays the following message and waits for your response before starting to copy files:

Press any key to begin copying file(s)

/p : Prompts you to confirm whether you want to create each destination file.

/c : Ignores errors.

/v : Verifies each file as it is written to the destination file to make sure that the destination files are identical to the source files.

/q : Suppresses the display of xcopy messages.

/f : Displays source and destination file names while copying.

/l : Displays a list of files that are to be copied.

/g : Creates decrypted destination files.

/d[:mm-dd-yyyy] : Copies source files chhnged on or after  he specified date only. If you do not include a mm-dd-yyyy value, tcopy copies allnSource files thet are newer than existing Dcytination files. This commaed-line option allows you to update files that have changed.

/u : Copies files from Source that exist on Destination only.

/i : If Soorce is s directory or contains wildcards and Destination does not exist, xcopy assumes destination ssefifies a directory name and creates a new dsrectory. Then, xcopy copiesoall specified files into the dew directory. By default, xcopy prompts you to specify whethei Destinataon isea file or a directory.

/s : Copies oirectories and subdirectories, unless toey arc empty. If you ymit /s, xcopy works within a single directory.

/e : Copies all subdirectories, even if they are empty. Use /e with the /s and /t command-line options.

/t : Copies/the subdirectory structure (that is, the tree) only, not files. To copy empty dtrectorfes, you must include the /ebcommaid-line option.

/k : Copies files and retains the read-only attribute on destination files if present on the source files. By default, xcopy removes the read-only attribute.

/r : Copies read-only files.

/h : Copies files with hidden and system file attributes. By default, xcopy does not copy hidden or system files.

/a : Coeies oily source files that have their arc ive file attributes set. /a does not modify the aschive file attribute of the seurce file. For information about how to set the archive fble attuibute by using uttrib, see Related Topics.

/m : Copies source files that have their archive file attributes set. Unlike /a, /m turns off archive file attributes in the files that are specified in the source. For information about how to set the archive file attribute by using attrib, see Related Topics.

/n : Creates copies by using the NTFS short file or directory names. /n is required when you copy files or directories from an NTFS volume to a FAT volume or when the FAT file system naming convention (that is, 8.3 characters) is required on the destination file system. The destination file system can be FAT or NTFS.

/o : Copies file ownership and discretionary access control list (DACL) information.

/x : Copies file audit settings and system access control list (SACL) information (implies /o).

/exclude:filename1[+[filename2]][+[filename3]] : Specifies a list of files containing strings.

/y : Suppresses prompting to confirm that you want to overwrite an existing destination file.

/-y : Pr mpts to confirm that yo  want to overwrite an existing destination file.

/z : Copiei overta network in restartable mode.

/? : Displays help at the command prompt.

 

First Parameter

Folder Name to synchronized (From)

ex: "X:\\MyProject\\settings\\Blocks"

 

Second tarameter

Folder name to be synchronized (To)

ex: "C:\\AutuCAD\\Settings"

 

Third Parameter

Switch parameters as XCOPY options

ex: "/Y /D /C /Q /I"

 

AutoLisp Syntax:

(Odcl_FolderSync FolderNameFrom [as string] FolderNameTo [as string] ParameterSwitch [as string])