# Using ReadDirectoryChangesW() to get information about new files in a folder

L

#### LUN2

##### Guest
Good evening!

I need to get information about new files in certain directory (Windows 10, C++).

To do this (1) I call ReadDirectoryChangesW in overlapped mode and point an event to be signaled when ReadDirectoryChangesW will finish, (2) wait until event will be signalled (WaitForMultipleObjects), (3) call GetOverlappedResult to get ReadDirectoryChangesW info about new files.

All actions above are repeated in a loop.

It works well, but if I create two or more files simultaneously (copy several files and paste them in the Windows Explorer), then in the step (3) I get info about one file only.

But if I rename a file, then I correctly get from ReadDirectoryChangesW two records – about old and new file names.

Buffer (FILE_NOTIFY_INFORMATION) for ReadDirectoryChangesW likely does not overflow – I allocate 10 kb, information about new files is about 50-200 bytes (their paths and names are short enough).

If I do copy/paste 1 file, then 1 file etc, than each copying is reported normally.

It seems ReadDirectoryChangesW/GetOverlappedResult return info about 1 file only if new files appear "fast" (copy/paste several files), but how can I get info about other files ?

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

#### How can I use the Table and Append commands to make Dimen

• Julissa Velasquez
• Mathematics
• Replies: 0
Julissa Velasquez Asks: How can I use the Table and Append commands to make Dimen
I have two sets of data with different dimensions. I would like to use the Table function to create data to fill the dimensions and append it to the set, so both sets have the same dimensions.

I would like to start from the last value and create various x values (up to 2500) while the y can stay the same. So that data2 {917, 2} matches the dimensions of data 1 {1337,2}. Any insight would be greatly appreciated.

Code:
 In[1]:= data1 =
Import["/Users/julissavelasquez/Box/1_Harrison Lab/03_Formic \
Acid/Wodtke_2021_Fig4C/hyperthermal_dist.xlsx", "SkipLines" -> 2][[1]];

In[2]:= data2 =
Import["/Users/julissavelasquez/Box/1_Harrison Lab/03_Formic \
Acid/Wodtke_2021_Fig4C/thermal_dist.xlsx", "SkipLines" -> 2][[1]];

In[3]:= {Dimensions[data1], Dimensions[data2]}

Out[3]= {{1337, 2}, {917, 2}}

In[4]:= data2[[1 ;; 2]]

Out[4]= {{2.9895, 0.00054879}, {5.979, 0.00054814}}

In[5]:= data2[[-2 ;; -1]]

Out[5]= {{2487.29, 2.7924*10^-6}, {2490.28, 2.1354*10^-6}}

In[6]:= Table[data2, {i, 2490.28, 2500}]

Out[6]= If[25048064219406400976 === $SessionID, Out[6], Message[ MessageName[Syntax, "noinfoker"]]; Missing["NotAvailable"]; Null] SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others. #### How can I Prove this? Is the explanation correct? alwayscurious Asks: How can I Prove this? Is the explanation correct? The Problem is:- if there is a polynomial-time, additive 80-approximation algorithm for the Minimum Vertex Cover problem, then P = NP. What i am thinking is, since we already know that the Min vertex cover + 80 vertices which spans vertex cover can be solved in polynomial time and then we need to find V-80 vertices from V ( V is total number of vertices in vertex cover) which is also vertex cover. this can also be done in polynomial time. Therefore the Min. Vertex Cover Problem can be solved in polynomial time. Therefore, P=NP. I feel like this is wrong explanation. Any help is appreciated. SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others. #### upstream and downstream shocks from timeseries spacecraft data (velocity, density, magnetic field, temperature, etc.) Mon Asks: upstream and downstream shocks from timeseries spacecraft data (velocity, density, magnetic field, temperature, etc.) How we can get the upstream and downstream shock structure from timeseries spacecraft data (velocity, density, magnetic field, temperature, etc.) SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others. #### Can the mean value theorem be used for an inequality that holds for every real number? • raffaello.sanzio • Mathematics • Replies: 0 raffaello.sanzio Asks: Can the mean value theorem be used for an inequality that holds for every real number? Like in cosx<=1-(x^2/2)+(x^4/24) , can we use the mean value theorem to show that this equality holds for every real number x or do we prove it in another way? SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others. #### Statistical question kkkk Asks: Statistical question Consider a population of individuals of varying values. Suppose that 3 individuals are drawn at random and with replacement from this population. Let X, Y , and Z be the values of the individuals drawn respectively. Consider the two derived variables U = 2X+3Y and V = 3X+2Y −3Z. Obtain the correlation coefficient between U and V . Your answer should be a number. SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others. #### What recursive extensions are there of axiomatic second-order logic. • Keshav Srinivasan • Mathematics • Replies: 0 Keshav Srinivasan Asks: What recursive extensions are there of axiomatic second-order logic. There are two semantics used for second-order logic, Henkin semantics and standard semantics. It’s easy to make a recursive deductive system$D$that is sound and complete with respect to Henkin semantics. Furthermore,$D$is also sound with respect to standard semantics, but it is not complete. This is because no recursive deductive system can be both sound and complete with respect to standard semantics, as the set of second-order logical validities with respect to standard semantics is not recursively axiomatizable or even arithmetical. My question is, what examples are there of recursive extensions of$D$, in the language of pure second-order logic, which are sound with respect to standard semantics? Are there any natural examples? I know the set of second-order logical validities is definable in the language of$ZFC$and even in the language of$\lambda+1^{st}$-order arithmetic where$\lambda$is the Lowenheim number of second-order logic (which is bigger than many large cardinals if they exist). So there are some recursively enumerable sets of sentences which those two theories prove are second-order logical validities. But first of all those theories are not written in the language of pure second-order logic, and second of all I imagine they prove far, far more second-order logical validities than$D$does. So I’m interested in systems of intermediate strength between$D$on the one hand, and$\lambda+1^{st}$-order arithmetic and$ZFC$on the other. SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others. #### (T/F) Let V be a vector space and$S = {v_1,v_2....v_n}$such that$span(S) = V$. S can be extended to a basis for V. • Tripping_Lettuce • Mathematics • Replies: 0 Tripping_Lettuce Asks: (T/F) Let V be a vector space and$S = {v_1,v_2....v_n}$such that$span(S) = V$. S can be extended to a basis for V. (False) Proof- Assume the linear combination of S is equal to$S = a_1v_1+a_2v_2+...+a_nv_n$where all scalars are$a = 0$then$S = 0v_1+0v_2+...+0v_n = 0$. Therefore, according to the definition of a basis,$span(S) = \vec0\$ is a linearly dependent, so S can't extend to a basis for V since.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.