LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Copy the latest content of the folder

Hi Friends,
 
Please let me know how to copy the recently added file contents to a folder.
My req is something like this.
I've a folder called \desktop\pro in my PC.
Everytime i run my VI exe few .jpg's would be added to that.
So the most recent .jpg's whichever were added to that i need to copy to a new folder \desktop\template
 
Please let me know how to implement this...
 
-Suneel
0 Kudos
Message 1 of 12
(3,599 Views)

Hi Suneel,

read all files and create a list of them. If there are file in your folder which are not in the list, then copy them. After copying update your file. If you need it only ones a day, you can read the date and decide with reference to this which you want to copy.

Hope it helps.
Mike

0 Kudos
Message 2 of 12
(3,597 Views)
Hi Mike,
 
If there are file in your folder which are not in the list, then copy them.
Please be more specific how to do this check technically in Labview.
Below is the VI attached which i've done so far.
ANd one more thing i couldnt copy  the content (.jpg's alone) its copying the entire folder.
 
COuld you suggest the best functions which i can directly use.
 
-Suneel
0 Kudos
Message 3 of 12
(3,593 Views)
Hi Suneel,
read first the content of the folder. Compare the result with a list, maybe an ini file and copy only the files which are new. To copy single files, contect the file path to the copy function.
If you want no administration effort, then you can copy everytime the entire directoy. Smiley Wink
 
Mike
0 Kudos
Message 4 of 12
(3,589 Views)
Hi Suneel,
                 Can you post your vi for lv 8.0?or a screen shot of your block diagram?
0 Kudos
Message 5 of 12
(3,587 Views)
Hi suneel,
                U have to define *.jpg in the pattern.Please check the attached vi.
Message 6 of 12
(3,586 Views)

Everytime i run my VI exe few .jpg's would be added to that.
So the most recent .jpg's whichever were added to that i need to copy to a new folder \desktop\template

If storing of the jpg is under your control, then name them along with the current system time. So once you run your vi the jpgs will be created have the name of current time.In list file you can define the pattern accordingly and read them.

IS that what you were looking for?
Message 7 of 12
(3,584 Views)

Hi Muks,

 

My Vi saved with 8.0 version

 

-Suneel

0 Kudos
Message 8 of 12
(3,572 Views)
Hi suneel,
                 So did you check the vi that i had attached?
Message 9 of 12
(3,553 Views)

Yup its a general example to list the content of the folder..

i am trying at my bench

i think i am almost near

 

will get back to u once i crack it....

0 Kudos
Message 10 of 12
(3,547 Views)