Topic "auto create directory?"

Author Message
drfunk2458
[View user's profile]

Joined: 2012-10-15
Posts: 7
Location: East Coast
Is there an option to automatically create a non-exiting folder when scripting an upload?

Note that the directory: WIN4443 & POS-Big Huge Sale Window (PLACE) does not exist on the target host...
Here is the log...

> 2013-02-08 13:14:06.337 Script: put "\\xxxxxx\TCP_MAC2\xxxxxxx\PRODUCTION\Intern~1\DailyU~1\WIN4443 & POS-Big Huge Sale Window (PLACE)\10x8.75 speech bubble Folder.sitx" "/out/WIN4443 & POS-Big Huge Sale Window (PLACE)/10x8.75 speech bubble Folder.sitx"
. 2013-02-08 13:14:06.337 Copying 1 files/directories to remote directory "/out/WIN4443 & POS-Big Huge Sale Window (PLACE)/"
. 2013-02-08 13:14:06.337 PrTime: No; PrRO: Yes; Rght: rw-rw-rw-; PrR: No (Yes); FnCs: N; RIC: 0100; Resume: N (102400); CalcS: No; Mask: 10x8.75 speech bubble Folder.sitx
. 2013-02-08 13:14:06.337 TM: M; ClAr: No; CPS: 0; InclM:
. 2013-02-08 13:14:06.337 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2013-02-08 13:14:06.337 File: "\\xxxx\TCP_MAC2\xxxxxxx\PRODUCTION\Intern~1\DailyU~1\WIN4443 & POS-Big Huge Sale Window (PLACE)\10x8.75 speech bubble Folder.sitx"
. 2013-02-08 13:14:06.353 Copying "\\xxxx\TCP_MAC2\xxxxxxx\PRODUCTION\Intern~1\DailyU~1\WIN4443 & POS-Big Huge Sale Window (PLACE)\10x8.75 speech bubble Folder.sitx" to remote directory started.
. 2013-02-08 13:14:06.353 Binary transfer mode selected.
. 2013-02-08 13:14:06.353 Opening remote file.
> 2013-02-08 13:14:06.353 Type: SSH_FXP_OPEN, Size: 107, Number: 32654339
< 2013-02-08 13:14:06.353 Type: SSH_FXP_STATUS, Size: 29, Number: 32654339
< 2013-02-08 13:14:06.353 Status code: 2, Message: 32654339, Server: No such file, Language:
> 2013-02-08 13:14:06.353 Type: SSH_FXP_LSTAT, Size: 91, Number: 32654599
< 2013-02-08 13:14:06.353 Type: SSH_FXP_STATUS, Size: 29, Number: 32654599
< 2013-02-08 13:14:06.353 Status code: 2, Message: 32654599, Server: No such file, Language:
* 2013-02-08 13:14:06.368 (ETerminal) No such file or directory.
* 2013-02-08 13:14:06.368 Error code: 2
* 2013-02-08 13:14:06.368 Error message from server: No such file
* 2013-02-08 13:14:06.368 Request code: 3
. 2013-02-08 13:14:06.368 Asking user:
. 2013-02-08 13:14:06.368 Cannot create remote file '/out/WIN4443 & POS-Big Huge Sale Window (PLACE)/10x8.75 speech bubble Folder.sitx'. ("No such file or directory.
. 2013-02-08 13:14:06.368 Error code: 2
. 2013-02-08 13:14:06.368 Error message from server: No such file
. 2013-02-08 13:14:06.368 Request code: 3")
< 2013-02-08 13:14:06.368 Script: Cannot create remote file '/out/WIN4443 & POS-Big Huge Sale Window (PLACE)/10x8.75 speech bubble Folder.sitx'.
< 2013-02-08 13:14:06.368 Script: No such file or directory.
< 2013-02-08 13:14:06.368 Error code: 2
< 2013-02-08 13:14:06.368 Error message from server: No such file
< 2013-02-08 13:14:06.368 Request code: 3
* 2013-02-08 13:14:06.384 (EScpSkipFile) Cannot create remote file '/out/WIN4443 & POS-Big Huge Sale Window (PLACE)/10x8.75 speech bubble Folder.sitx'.
* 2013-02-08 13:14:06.384 No such file or directory.
* 2013-02-08 13:14:06.384 Error code: 2
* 2013-02-08 13:14:06.384 Error message from server: No such file
* 2013-02-08 13:14:06.384 Request code: 3
. 2013-02-08 13:14:06.384 Script: Failed
. 2013-02-08 13:14:06.384 Script: Exit code: 1
. 2013-02-08 13:14:06.384 Closing connection.
. 2013-02-08 13:14:06.384 Sending special code: 12
. 2013-02-08 13:14:06.384 Sent EOF message
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
You can use mkdir before put and ignore errors.
For conditional creating of the directory, it's better to go with WinSCP .NET assembly:
http://winscp.net/eng/docs/library
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License