Solved

UNIX FileSize

Posted on 2006-10-28
2
245 Views
Last Modified: 2010-05-18
Hi...

My application is running on Windows OS and opening file with TFileStream readonly. The file wich my app is opening is on UNIX. Using SAMBA. Its does read the file, but sometimes, there is problem reading it, the file size doesn't change sometimes, but i'm sure there has been changes in file.

If i goto to that directory with Explore, my app notices when file size has been changed.

So what i'm interesting in. How to send command to windows to refresh that dir. I think there should be some kind of shell function in shell32.dll. wich refresh the directory.

In short sentences, i need to refresh directoy so i could notice changes in file size. Why i'm thinking about shell function? Becouse app notices the changes in file size, when i go into that directory with explorer.

So
my app runs on Windows OS
file is located on UNIX
i'm using SAMBA to be able to read file from UNIX.

thanks.
0
Comment
Question by:Kristao
2 Comments
 
LVL 26

Accepted Solution

by:
Russell Libby earned 215 total points
ID: 17825676
You could try the following, which is used to notify the shell of changes to a given path.

  // Uses ShlObj in the uses clause
  //
  // Example for refreshing the path "c:\windows". Change the path to your
  // desired path.
  //

  SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_PATH, PChar('c:\windows'), nil);

----

Regards,
Russell
0
 
LVL 1

Author Comment

by:Kristao
ID: 17844372
Tried some tests and looks like its does work.

thx
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
FMX enumerated colours 2 119
Delphi application Soap connection 5 123
Delphi inherited method 6 76
FMX and jaudiotracker playing memory stream 29 87
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question