04-18-2014 04:06 PM - edited 04-18-2014 04:09 PM
@JÞB wrote:
The one I din't understand completely is the select in reverse scan from string for interger. I'd probably save some wires and make -1 the default but I'm sure there is a reason.
There is a reason. The reason is that I've always thought of that as a type terminal, not a default value terminal. I can make the change you suggest.
However -- in testing that change, I found a bug, one that I don't think I can get around.
Scan From String and Format Into String are apparently not reciprical.
If I take the number 56 and format it into string using "%01d" and using "%d", I get the same resulting string:
"56"
But if I then use Scan From String on the input "56", I get different results:
"%d" ===> 56
"%01d" ===> 5
In other words, I cannot guarantee that I can reverse engineer the integer out of a file given a format string used to originally generate the file.
Anyone have any ideas?
04-18-2014 04:13 PM
Hm... this works... I eliminate any of the format codes between the "%" and the "d" when doing the Scan. Can anyone think of circumstances where this would be a bad idea?
04-18-2014 07:18 PM
I kind of found the same dratteded thing I think. I wanted your eyes on it.
Tim's regex has a simillar flaw where the 0n part of %0nd gets ignored for integer strings shorter than but not longer than n. and you can't really anchor them while excluding the ")" (Blew my mind!)
Honestly, I was hoping I had really really missed something....
On the other hand, if you limit the scope to "uniquify": only by given path and last field of file name and define the that field character to be constant,,,,, ... rather than possibly add a "unique" field and post unique fields.
Your proposal would find the last interger field in a filename regaurdless of if its the intended unique field but can be anchored so the "uniqued" feild specifier needs only to require any Post unique formats.... and then it gets really ugly since we don't know how many post unique field format specifiers there are.
Limit the scope. to unique field must be anchored..
04-21-2014 12:08 PM
For some reason, ni.com will not allow me to upload the .zip file containing the VIs. I don't know why... it worked fine last week, but this week it says that the attachment doesn't match its file type. Anyone ever seen this happen before?
04-21-2014 12:28 PM
@AristosQueue (NI) wrote:
For some reason, ni.com will not allow me to upload the .zip file containing the VIs... Anyone ever seen this happen before?
Goes back quite a while, and for some reason is not taken care of, despite regular reminders. I believe the usual suggestion is to change the extension, but you can look at this thread to see if there are other suggestions - http://forums.ni.com/t5/Feedback-on-NI-Discussion-Forums/Problems-uploading-a-ZIP-file/td-p/2465382/
04-21-2014 12:39 PM
Hi Aristos,
despite regular reminders
Guess it's time for a new bumping of that thread…
Around Christmas I already received PMs from NI staff where I was promised some in-depth examination of that problem, but that's now more than 4 month ago…
04-21-2014 03:54 PM
Attached is the final. I put a junk file extension on it. Just remove the ".txt" and then unzip the VIs.
05-02-2014 05:29 PM
Like many, I've historically created unique / sequential / sortable filenames by adding a leading timestamp. Timestamp is leading so that sets of files with different descriptors but the same leading timestamp will be listed together during a standard Windows Explorer name sort. I've included subVIs that I've found useful.