LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delete one and rename file in a folder

I have developed a VI that says which image is the lowes intensity among the 3 images in a given folder.

 

  1. How can I automatically delete that image from the folder and rename the other two as Image 1 and Image 2 ?
  2. If the deleted image orginally is 2nd image in the folder , I want the 3rd image to renamed as 1 and the 1st image to renamed as 2.
  3. If the deleted image orginally is 1st image in the folder , I want the 2nd image to renamed as 1 and the 3rd image to renamed as 2.
  4. If the deleted image orginally is 3rd image in the folder , I want the 1st image to renamed as 1 and the 2nd image to renamed as 2.

Basically its a rolling sequence, where the deleted image is always considered the last in the series and the images that are in the folder are not in the correct sequence.

 

How can I achieve this efficiently.

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
Download All
0 Kudos
Message 1 of 2
(2,160 Views)

You could bundle the intensity with the filename (intensity as the first element), sort 1d array, then rename and delete files as necessary:

Example_VI.png

0 Kudos
Message 2 of 2
(2,148 Views)