@D3abL3: I do not think this works. Please post some logs if you believe otherwise.
- martin
mv /media/EXCLUSIVO_DISNEY/*/*.* /media/EXCLUSIVO_DISNEY/
/media/EXCLUSIVO_DISNEY/
and move all files inside every folder into /media/EXCLUSIVO_DISNEY
mv
. So it seems that you have completely changed topic.
*.*
mask, see https://winscp.net/eng/docs/file_mask#exceptions
cd C:\test2
for /D /r %%i in (*) do (
cd %%i
"C:\Program Files\winscp556\winscp.exe" /console /script="C:\Program Files\winscp556\UploadScript.txt"
)
option batch on
option confirm off
open user:password@sftp.somesite.com -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx"
option transfer binary
put -filemask="|*/" *.txt>24H
close
exit
TransferOptions
? I have a script that I need to upload only the text files from a directory tree and dump them all into one folder on the destination server rather than mirror the directory tree. The following setup seems to send only text files but also mirrors the directory tree:
# Upload files
$transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.TransferMode = [WinSCP.TransferMode]::Binary
$transferOptions.filemask = "*.txt"
$transferResult = $session.PutFiles("c:\test2\", "/Home/*", $False, $transferOptions)
mv *.* /some/other/dir/
get
command.
mv *.* newDirectory/