LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Move or delete a file after a time period

How would such a program look that the user specifies the length of time that the file should be moved or deleted after or if a file size goes over a certain limit?

 

LabVIEW 2013

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 1 of 8
(2,971 Views)

While loop that periodically checks the file size and modified date (File/Directory Info function should do it).  If it goes higher in size and elapsed time, delete or move and quit.  I would use a wait of something like 500ms.  Also allow a way for the user to stop the loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 8
(2,960 Views)

Thanks for your reply,

 

Would it be possible to see a simple VI example of this?

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 3 of 8
(2,956 Views)

Something like this


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 8
(2,947 Views)

How would the user choose between moving or deleting the file after that time period ?

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 5 of 8
(2,928 Views)

@PauldePaor wrote:

How would the user choose between moving or deleting the file after that time period ?


Boolean switch.  Enum.  The enum would probably be the better way since it is more self documenting and easier for the user to see what is happening.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 8
(2,922 Views)

How would the enum work if the greater than function is already wired to the case selector?

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 7 of 8
(2,917 Views)

You have another case structure inside of the current case structure.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 8
(2,912 Views)