Solved

UNIX FileSize

Posted on 2006-10-28
2
244 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
calling Tcolordialog in dll make the form disappear 8 111
FMX enumerated colours 2 98
Delphi XE10 Round Image 2 124
can i put an image from resource into image tag ? 6 24
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

786 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