07-07-2009 01:45 PM
Hi,
Im needing help to open a folder and look for a file (.txt) on this directory by his name ... The user ll type the partial name of file , and i need look for this file on the folder , and delete it ....
How can i look for the file by his name ?
Thx 😃
07-07-2009 01:55 PM
Look at the "Check if File or Folder Exists.vi". FileIO...Advanced File Functions pallet.
-cb
07-07-2009 02:43 PM
That will only tell you if a file exists, assuming the full name is provided. The poster wants to see if a file exists based on a partial name.
The question is somewhat ill-formed and incomplete. What if the user types something and there are several matches? What if the user types in just "a"? In this case, how is the program supposed to know which file to delete? Are you intending to provide some sort of filtered view that updates based on the user typing? If that's the case wouldn't it be easier to provide a listbox of all the files in the folder and then have the user select the file to delete?
07-07-2009 04:33 PM
Hi ,
Sry ,, let me explain again ... I ll set the name of the files in the follow order ... Name_Serial_date_chanel.sxc ..
The user ll type the serial that he wants delete ...
I already figured out what i need guys .. thx for the help ^^
I used List Directory on advanced IO , to list all .. the Name is the same for all ... then i used Name_ concateneted with Serial(typed)* .. this command serial* ll list all serials equal the typed , in my case , ll exist only one , cuz its a count this serial .Then i pass the path to the delete , and its done !
Thx ^^