You could try a different format. I use a windows batch file(.bat)
Using a different format does not change a meaning of the commands.
You could try a different format. I use a windows batch file(.bat)
/log=path_to_log_file
command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.^
symbol. The ^
must be the final character on each line.
@echo off
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\scripts\WinSCP-5.9.1-Portable\log_!Y_!M_!D_!T.log" /loglevel=0 /ini=nul ^
/command ^
"open sftp://username@serverip/ -hostkey=""ssh-rsa 2048 xx:xx:xx:xx"" -privatekey=""C:\scripts\Puttygen\privkey.ppk""" ^
"option batch abort" ^
"option transfer binary" ^
"option synchdelete on" ^
"synchronize local d:\inetpub\web\ /web/ -criteria=both -filemask=""| alert.xml; emergency.xml; .htaccess; notice.xml; sitemap.xml; web.config; wincache.php; fileshare/; xml-sitemap-generator/""" ^
"close" ^
"quit" ^
"exit"
*; */ | sessions/
/sessions
.
synchronize local c:\MySites\Site1\ /public_html -delete -preservetime -filemask="*; */ | sessions/"
sessions
folder and files underneath.
synchronize local c:\MySites\Site1\ /public_html -delete -preservetime -filemask="| sessions/"
/sessions
is empty, they will not transfer.
All info on the forum always mention that you have to have two cotations!
The manual says two (double)
synchronize local c:\MySites\Site1\ /public_html -delete -preservetime -filemask="| sessions/"
| sessions/
), works exactly the way I need.
synchronize local c:\MySites\Site1\ /public_html -delete -preservetime -filemask=""| sessions/""
*.*
part of the filemask. I just leave it blank on mine and I have just the exclusions set. I sync tons of folders and subfolders and have no issues. I'll look through the forums. There should be an example of what you need somewhere.
-filemask=""*.*; *.*/|/sessions/""
Too many parameters for command 'synchronize'.
*/
means to not sync any subfolders so you don't want that.
/sessions
)
-filemask=""|*/sessions/""
-filemask=""|/sessions/""
-filemask=""*/|*/sessions/""
-filemask=""*.*/|*/sessions/""
-filemask=""*/*|*/sessions/""
/sessions
.
/public_html -delete -preservetime -filemask=""| sessions/""
/sessions
folder, sometimes I get error when a user leaves the database, so I figure out that the best option will be to EXCLUDE that.
synchronize local c:\MySites\Site1\ /public_html -delete -preservetime -filemask=""*/*|*/sessions""
/sessions
IS NOT being copied, but also, any sub-folder from my root. What I'm doing wrong?
/
index.html
manyfiles.html
/folder1
/folder1/index.html
/folder1/manyfiles.html
/folder2
/folder2/index.html
/sessions/
/sessions/manysessions.html
/
but none under any /folder1
or /folder2
.