如何创建一个将特定文件从一个目录复制到另一个目录的程序?
假设有一个文件夹“Videos”,文件名为 1.avi ,2.avi ,3.avi ,4.avi .. 直到 100.avi 。 我创建了一个输出一些数字的程序(比如说 92 , 31 , 92 ,85, 45 )。现在我希望将所有名为 92.avi 、 31.avi 、 92.avi 、85.avi 、 45.avi 的文件复制到另一个名为“选择的视频”的文件夹中 请注意,92 出现两次,所以我希望将其复制两次。第一个为 92.avi,第二个为 92(1).avi
如何在 java 或 php 中执行此操作
suppose there is a folder 'Videos' with file names 1.avi ,2.avi ,3.avi ,4.avi .. till 100.avi .
i have created a program that outputs some numbers (let's say 92 , 31 , 92 ,85, 45 ) . now i want all the files named 92.avi , 31.avi , 92.avi ,85.avi , 45.avi to be copied to another folder named 'Chosen Videos'
note that 92 occurs two times so i want it to be copied 2 times.first one as 92.avi and the second one 92(1).avi
how to do this in java or php
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于 java,请查看 FileUtils 类 这里。
For java, take a look at the FileUtils class here.