Solved

UNIX FileSize

Posted on 2006-10-28
2
241 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
Comment Utility
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
Comment Utility
Tried some tests and looks like its does work.

thx
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now