02-10-2009 11:08 AM
Before I go re-inventing the wheel again, does anyone know of a LabVIEW function that can do the following:
If I have a folder with files A, B, C, D, E, F,G
and another folder with only files A,C,D,E
Is there a function that checks one folders' contents against anothers, then copies any files that dont exist in the other folder?
Off the top of my head I think I could write something that could do this, but if it already exists, whats the point .
Solved! Go to Solution.
02-10-2009 11:16 AM
I recently put together something like this, but probably too specific to my files to help you. By using the following vis you should be able to put one together pretty quick:
1. Recursive File List
2. Check if File or Folder Exists
3. Copy
These are all locate in File I/O, Advanced File Functions.
02-10-2009 11:36 AM
02-10-2009 11:39 AM
02-10-2009 12:06 PM - edited 02-10-2009 12:10 PM
The File/Directory Info VI has a last modified output.
last mod indicates the date and time at which the file or directory was last modified. The number is a time zone-independent number of seconds that have elapsed since 12:00 a.m., Friday, January 1, 1904, Universal Time.
You can use the straightforward Greater than or Less than to determine which is the newer version
08-24-2011 04:32 PM
I modified the vi to allow the user to select a backup time and day, so that it becomes automatic. This works well, but I will also need to backup any files in folders that exist inside the source folder.
So I need to read the source folder, then add the folder to the path, then copy the files in that folder.
How would I modify the VI to do this?
11-16-2015 07:27 AM
Could you give me a brief description on how the code auto backup folder files.vi works.
Thanking You.
Vindsan
11-17-2015 05:05 PM
The Auto Backup Folder Files VI is essentially an extension of the VI mentioned earlier in the forum that could look to see if files existed in folder A but not in folder B, and then copy the appropriate files to folder B. It “backs up” files based on a user-defined date using the same logic outlined above, and has the ability to create new files, write to later versions of a file, and/or replace old versions of files with new versions. You could say that it’s a “smarter” version of the VI proposed at the beginning of the forum.