开发者

how to create a program that copies specific files from one directory to another?

开发者 https://www.devze.com 2023-03-14 04:15 出处:网络
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 ) . n开发者_StackO

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 ) . n开发者_StackOverflowow 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


For java, take a look at the FileUtils class here.

0

精彩评论

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