如何将目录列表下载为.tar文件

时间:2019-11-16 10:02:15

标签: wget

我知道如何使用wget下载URL列表。但是我的列表有些不同,我不知道如何使用python(或任何命令行)连续下载此列表。我的列表包括许多目录,例如:

TreeView<String> treeView = new TreeView<>(); // never use raw type without good reason

// Create new folder
MenuItem menuItem1 = new MenuItem("Create New Folder");
menuItem1.setOnAction(e -> {
    TextInputDialog dialog = new TextInputDialog(); // replacing console input with dialog here

    dialog.setHeaderText("Please name your directory:");
    String strFolder = dialog.showAndWait().orElse(null);

    if (strFolder != null) {
        TreeItem<String> newFolder = new TreeItem<>(strFolder); // Create new TreeItem

        TreeItem<String> selection = treeView.getSelectionModel().getSelectedItem();

        createFolder(strFolder); // Create folder ; TODO: make dependent on parent???

        if (selection == null) {
            treeView.setRoot(newFolder); // Replace old folder with new one
        } else {
            selection.getChildren().add(newFolder);
            selection.setExpanded(true); // make sure we're able to see the new child
        }
    }
});

我想将每个目录另存为.tar文件。我尝试了FTP和下面的代码,但它使我“超时”错误(即使考虑了timeout = 3600之后)。你能指导我吗?

wget -q -nH -r -l0 -c -N -np -R 'index*' -erobots=off --retr-symlinks  --cut-dirs=4 
https://heasarc.gsfc.nasa.gov/FTP/xmm/data/rev0//0112310101/

wget -q -nH -r -l0 -c -N -np -R 'index*' -erobots=off --retr-symlinks  --cut-dirs=4 
https://heasarc.gsfc.nasa.gov/FTP/xmm/data/rev0//0112310501/

wget -q -nH -r -l0 -c -N -np -R 'index*' -erobots=off --retr-symlinks  --cut-dirs=4 
https://heasarc.gsfc.nasa.gov/FTP/xmm/data/rev0//0143500101/

0 个答案:

没有答案