Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#sshpass -p "qwerty" scp -r user@example.com:/some/remote/path /some/local/path
COUNTER=0
while [ $COUNTER -lt 10 ]; do
folderName=$(date)
echo $(date)
mkdir "$(date)"
cd "$(date)"
sshpass -p PASSWD scp USER@10.0.26.18:/var/log/* .
cd ..
@echo off
call :treeProcess
goto :eof
:treeProcess
rem Do whatever you want here over the files of this subdir, for example:
for %%f in (*.pdf) do call :copyAdditive "%%f"
for /D %%d in (*) do (
cd %%d
call :treeProcess