935090232@qq.com
2022-02-22 bbe0a2fd03063316e50cf141986bda984599bbda
zq-erp/src/main/java/fileMove.java
@@ -1,4 +1,6 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
@@ -52,7 +54,7 @@
   static List<String> wlist= Arrays.asList(youxiaoList);
    static String targetFilePath = "/mnt/sdc/webresource";
    static String targetFilePath = "C:\\Users\\Administrator\\Desktop\\webresource";
    public static void main(String[] args) throws IOException {
@@ -81,11 +83,10 @@
                            if(file2.getAbsolutePath().contains("weiqi.web.jyymatrix.cc")
                            && wlist.stream().anyMatch(item->item.equals(file2.getName())) ){
                                System.out.println("删除视频文件:" + file2.getAbsolutePath());
                                file2.delete();
                               /* System.out.println("移动视频文件:" + file2.getAbsolutePath());
                                System.out.println("移动视频文件:" + file2.getAbsolutePath());
                                FileInputStream in=new FileInputStream(file2);
                                FileOutputStream out=new FileOutputStream(new File("/mnt/sdc/webresource/vidos/"+file2.getName()));
                                FileOutputStream out=new FileOutputStream(new File("C:\\Users\\Administrator\\Desktop\\webresource\\vidos\\"+file2.getName()));
                                byte[] buff=new byte[1024];
                                int length=in.read(buff);
                                while (length>0){
@@ -93,11 +94,11 @@
                                    length=in.read(buff);
                                }
                                out.close();
                                in.close();*/
                                in.close();
                            }else if(file2.getAbsolutePath().contains("weiqi.web.jyymatrix.cc")
                                    && !wlist.stream().anyMatch(item->item.equals(file2.getName())) ){
                                System.out.println("删除视频文件:" + file2.getAbsolutePath());
                                file2.delete();
                               // System.out.println("删除视频文件:" + file2.getAbsolutePath());
                                //file2.delete();
                            }
                        } else {