LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add the date in a name file

Hello !

 

In my project, the user needs to fill an array of file path.

I would like to add the date in every file of the array. How can I do that ?

For exemple, if the user write this : D:\data\file1 and D:\data\file2 in the first 2 file of the array, i want to rewrite this and have that : D:\data\file1_29_07_2020_09_13 and D:\data\file2_29_07_2020_09_13.

 

Thank you in advance.

0 Kudos
Message 1 of 2
(1,254 Views)

Use a function to get the file name:

  • Strip Path to get a file name as string and the directory.
  • Get File Extension.vi gives you the extension and the file name without the extension. 
  • Path To String converts the entire path to string. 

 

Use string functions to modify the string:

  • Format Into String, using %<>T
  • Or Search and Replace to replace the ".ext" with "data.ext"

 

Use Build Path to add the file name to the directory.

 

EDIT:

Do this in a for loop...

 

Please let us know what step is the problem.

0 Kudos
Message 2 of 2
(1,201 Views)