开发者

Can i get the absolute path of just moved file to somewhere in native file system from known folder?

I am recently working on a Java desktop application which needs to track a path of file which has been recently moved to somewhere in native file system from the known source.

For Example : - Let's suppose i have a file A.txt in %TEMP% folder (C:\Users\Admin\AppData\Local\Temp\A.txt). Now Operating system moves that file to, suppose my Desktop. So i suppose to get the path "C:\Users\Admin\Desktop\A.txt".

How can I get the destination path, that's unknown, of recently moved file from known source?

Please Note:

  1. We can search the file name on Native file system but it makes the process slow and time consuming. Is there any fast searching code OR JAR, that would be a open source, available which can make a fast search without consuming time.
  2. Can we some who communicate with Operating system which can either give us the path of recently moved file OR we can access i开发者_StackOverflow社区ts logs Or etc..etc.
  3. It must work with Linux, MAC and Windows.

So finally we need the absolute path of just moved file to somewhere in native file system from known folder.


You could watch the original location with jnotify. This library work with linux, windows and OSX. It calls you on the move events.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜