Как удалить все файлы и папки в папке вызовом cmd

У Вас может быть несколько URL на удаленный в мерзавце, даже при том, что эти git remote команда, казалось, не представляла, это длится, я проверил. В .git/config, помещает что-то вроде этого:

[remote "public"]
    url = git@github.com:kch/inheritable_templates.git
    url = kch@homeserver:projects/inheritable_templates.git

Теперь можно сказать “ git push public ” для продвижения обоим repos сразу.

77
задан rene 28 January 2017 в 20:45
поделиться

1 ответ

No, I don't know one.

If you want to retain the original directory for some reason (ACLs, &c.), and instead really want to empty it, then you can do the following:

del /q destination\*
for /d %x in (destination\*) do @rd /s /q "%x"

This first removes all files from the directory, and then recursively removes all nested directories, but overall keeping the top-level directory as it is (except for its contents).

Note that within a batch file you need to double the % within the for loop:

del /q destination\*
for /d %%x in (destination\*) do @rd /s /q "%%x"
122
ответ дан 24 November 2019 в 10:47
поделиться
Другие вопросы по тегам:

Похожие вопросы: