来源和目的地 [英] source and destination

查看:117
本文介绍了来源和目的地的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的朋友们,想象一个用户从硬盘驱动器的位置复制(或剪切)了文件或文件夹(或任何对象)并将其粘贴到另一个位置,
(例如,从驱动器"C:\ test \"到"D:\ new \"),
如何获取该文件的源路径和目标路径.
我真的需要你的帮助.

Hi my friends,imagine a user copied(or cut) a file or folder(or any object) from a location of your hard drive and pasted it to another place,
(for example from drive "C:\test\" to "D:\new\"),
How can you get the source path and the destination path of that file.
i really need your help.
thanks in advance.

推荐答案

您将不得不问用户.

文件过去所在的位置或文件当前所在的位置不会存储在您可以查找的任何位置.如果您正在编写一个复制文件的程序,则应该知道文件应该在哪里,并可以使用变量名来跟踪它们.
You''ll have to ask the user.

Where files used to be or where they currently are isn''t stored anywhere that you can lookup. If you are writing a program that copies a file you should know where the files are supposed to be and can keep track of them with variable names.


这篇关于来源和目的地的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆