Example Code

File Synchronization using Commands in CMD

Code and Documents

Attachment

Overview

This program is much the same as File Synchronisers, however it utilises the command prompt to copy relevant files and folders. It allows you to list the files before copying them to a new directory.

Description

The program uses a producer consumer architecture, and queues. The user can select the type of copy that is performed (Copy data only or Mimic).

Copy data only will copy new data across, but will not mirror deletions. No files or folders are deleted.

Mimic will exactly mirror the base folder to the target folder. Any files or folders that are created, modified or deleted in the base directory are mirrored to the target location.

The mode type can be changed using the switch at the bottom of the front panel.

LVSync.PNG


Steps to Implement or Execute Code

1) Download the VI

2) Select a base directory

3) Select a target folder

4) List files / folders or Copy the data

Requirements

Software

LabVIEW 8.6 or newer

Windows OS

__________________________
Aidan H

Applications Engineer
National Instruments UK & Ireland

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors