-
August 25th, 2008, 12:56 AM
#1
How to Get Copy/Paste File Information
Hi,
I want to need of copy file/Folder information(File Name,File Path,File Data ...) which is currently copy.
secondly I want to need same for Paste file/Folder information.
Thanks
-
August 25th, 2008, 03:09 AM
#2
Re: How to Get Copy/Paste File Information
Could you describe more clear what and how you are doing (trying to do)?What is the problem you are trying to accomplish?
Victor Nijegorodov
-
August 25th, 2008, 04:07 AM
#3
Re: How to Get Copy/Paste File Information
Originally Posted by VictorN
Could you describe more clear what and how you are doing (trying to do)?What is the problem you are trying to accomplish?
I m developing a Utility getting for Copy/Paste information.
i want to find some details like
1. List of Copy/Paste file Name,Drive.
2. Path of Copy/Paste File Name
3. Time of Copy/Paste
4. Size of Files/Folder
Thanks
-
August 25th, 2008, 04:36 AM
#4
Re: How to Get Copy/Paste File Information
It is still not clear what you want/mean: is it just a "copy file" operation (using CopyFile(Ex) or ShFileOperation API) or do you want to develop some tool to work with the Clipboard?
Anyway:
1-2. Providing you have the full path name of the file you can split it to get file name, folder and drive using either CRT-function _splitpath/_wsplitpath or Path... APIs such as PathFindExtension, PathFindFileName, PathGetDriveNumber, PathFindNextComponent, ...
3. If you mean the time when you copy the file - then GetSystemTime API (or COleDateTime::GetCurrentTime)
4. There is no such a function returning size of the Folder. You should enumerate all the files within the folder (MFC class CFileFind) and calculate the sum of sizes of all the files (CFileFind::GetLength)
Victor Nijegorodov
-
August 25th, 2008, 05:21 AM
#5
Re: How to Get Copy/Paste File Information
Originally Posted by VictorN
It is still not clear what you want/mean: is it just a "copy file" operation (using CopyFile(Ex) or ShFileOperation API) or do you want to develop some tool to work with the Clipboard?
Anyway:
1-2. Providing you have the full path name of the file you can split it to get file name, folder and drive using either CRT-function _splitpath/_wsplitpath or Path... APIs such as PathFindExtension, PathFindFileName, PathGetDriveNumber, PathFindNextComponent, ...
3. If you mean the time when you copy the file - then GetSystemTime API (or COleDateTime::GetCurrentTime)
4. There is no such a function returning size of the Folder. You should enumerate all the files within the folder (MFC class CFileFind) and calculate the sum of sizes of all the files (CFileFind::GetLength)
Ok it's good but how can i know from which drive file is copy.And i am not going to use clipboard.
Simply i want to know from which drive file is copy/past.
-
August 25th, 2008, 06:01 AM
#6
Re: How to Get Copy/Paste File Information
But isn't it *YOU* who copies/pastes this file?
Victor Nijegorodov
-
August 25th, 2008, 06:26 AM
#7
Re: How to Get Copy/Paste File Information
Originally Posted by VictorN
But isn't it *YOU* who copies/pastes this file?
See any one use this Utility.So User don't know about that.
-
August 25th, 2008, 06:35 AM
#8
Re: How to Get Copy/Paste File Information
Originally Posted by anubhava
See any one use this Utility.So User don't know about that.
What do you mean?
Originally Posted by anubhava
Simply i want to know from which drive file is copy/past.
What information about the file to copy do you have? File path name? Then use one of the functions I referred to to obtain the drive.
Or you meant something comletely different? Then please describe more clear what and how you are doing
Victor Nijegorodov
-
August 25th, 2008, 06:49 AM
#9
Re: How to Get Copy/Paste File Information
Originally Posted by VictorN
What do you mean?
What information about the file to copy do you have? File path name? Then use one of the functions I referred to to obtain the drive.
Or you meant something comletely different? Then please describe more clear what and how you are doing
My software is running in hidden mode. My utility is like a logger. Which store the information of all copy/paste.For that i want to need of Copy/Paste information (Files/Folders name,Drive Name,Time etc.).
Thanks
-
August 25th, 2008, 06:58 AM
#10
Re: How to Get Copy/Paste File Information
Where does your "logger" get the initial information about "Copy/Paste" from? How?
What type of such an information about "Copy/Paste" does it get?
Victor Nijegorodov
-
August 25th, 2008, 07:24 AM
#11
Re: How to Get Copy/Paste File Information
Originally Posted by VictorN
Where does your "logger" get the initial information about "Copy/Paste" from? How?
What type of such an information about "Copy/Paste" does it get?
My utility is like a service. which store all Files/Folder related information in Log.
Like as : Which file/Folder is renamed,Modified,Move,Create,delete.
For that how to get file information which is copied/Pasted.
Thanks
-
August 25th, 2008, 08:07 AM
#12
Re: How to Get Copy/Paste File Information
Originally Posted by anubhava
My utility is like a service. which store all Files/Folder related information in Log.
Like as : Which file/Folder is renamed,Modified,Move,Create,delete.
For that how to get file information which is copied/Pasted.
Does your " like a service" already exist/work and is able to get at least something about the file operations?
Or it is only aour dream to somehow develop such an application?
If former - then what information are you already able to get?
If latter - have a look at FindFirstChangeNotification/FindNextChangeNotification and/or ReadDirectoryChangesW APIs
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|