Topic "Put files with wildcard - Error"

Author Message
Hugo Hugrich
[View user's profile]

Joined: 2009-01-14
Posts: 1
Location: Germany
Hi,

i use WinSCP 4.18 and i am a Beginner. We need to put some files to another company.
This files have a running number. The file-name ist bq00001 bq00002 and so on.
The files should be delete after i have puted the files to the another company.

I want to run the transfer in a batchmode. I have written a bat-file with content:


set abfrage=D:\Programme\test
set winscp=D:\Programme\Winscp
cd /D %abfrage%
if exist %abfrage%\bq*.* %winscp%\winscp.exe /console /hostkey /log=D:\log.txt /script=abfragebzr.txt
cd \

The file abfragebzr.txt content:

option batch on
option confirm off
open session_test
put -delete bq*

but now i get an error in the log-file. Here are content of the log-file-error:


. 2009-01-14 11:54:03.746 Copying 1 files/directories to remote directory "/home/test/data"
. 2009-01-14 11:54:03.746 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 01; Resume: S (102400); CalcS: No; Mask:
. 2009-01-14 11:54:03.746 TM: M; ClAr: No; CPS: 0; ExclM(No):
. 2009-01-14 11:54:03.746 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2009-01-14 11:54:03.746 File: "bq*"
* 2009-01-14 11:54:03.761 (EOSError) System Fehler. Code: 123.

* 2009-01-14 11:54:03.761 Die Syntax fr den Dateinamen, Verzeichnisnamen oder die Datentrgerbezeichnung ist falsch
. 2009-01-14 11:54:03.761 Asking user:
. 2009-01-14 11:54:03.761 Datei oder Verzeichnis "bq*" existiert nicht. ("System Fehler. Code: 123.

. 2009-01-14 11:54:03.761 Die Syntax fr den Dateinamen, Verzeichnisnamen oder die Datentrgerbezeichnung ist falsch")
* 2009-01-14 11:54:03.777 (EScpSkipFile) Datei oder Verzeichnis "bq*" existiert nicht.
* 2009-01-14 11:54:03.777 System Fehler. Code: 123.
* 2009-01-14 11:54:03.777 Die Syntax fr den Dateinamen, Verzeichnisnamen oder die Datentrgerbezeichnung ist falsch
. 2009-01-14 11:54:03.777 Closing connection.
. 2009-01-14 11:54:03.777 Sending special code: 12
. 2009-01-14 11:54:03.777 Sent EOF message

I try to translate the error at 2009-01-14 11_54:03.761 file or directory "bq* does not exist) (System Error. Code 123)

What is wrong in my skript ?

Sorry about my English.

Christian
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
You have to use *.* in your put command.
The documentation was wrong about using of file masks. I have fixed that.
_________________
Martin Prikryl
hemant_kalal

Guest


Hi,

I am using following script to upload all the files from local directory to remote system, the requirement is that if a perticular file already exist then it should not copy that file and move on with the next file but the problem is that if it finds the file on the remote server it exits the session and does not consider the next file, If say I delete all the files from the remote machine then the script works fine.Pls. let me know where I am doing it wrong.


option batch on
put c:\temp2\*.txt
close
exit
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
hemant_kalal wrote:
I am using following script to upload all the files from local directory to remote system, the requirement is that if a perticular file already exist then it should not copy that file and move on with the next file but the problem is that if it finds the file on the remote server it exits the session and does not consider the next file, If say I delete all the files from the remote machine then the script works fine.Pls. let me know where I am doing it wrong.

option batch on
put c:\temp2\*.txt
close
exit

Use "synchronize remote", not "put". Read documentation.
_________________
Martin Prikryl
Kevdog777

Guest


Hi,

I have hit an issue in WinSCP.

I am trying to copy a file from SCO to my local machine (Vista), and am getting the following error:

Code:
System Error. Code: 123.
The filename, directory name, or volume label syntax is incorrect


All I am doing is:

1) dragging file1.txt from SCO (right hand side of WinSCP)
2) dropping file1.txt into the folder on my local machine - which was pre-created (left hand side of WinSCP)

I have done this many times with other platforms.

Is this an issue with my file or is this an issue elsewhere?[/list]
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Kevdog777 wrote:
All I am doing is:

1) dragging file1.txt from SCO (right hand side of WinSCP)
2) dropping file1.txt into the folder on my local machine - which was pre-created (left hand side of WinSCP)

Please start a new thread and attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. 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 may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
_________________
Martin Prikryl
kevdog777
[View user's profile]

Joined: 2013-11-26
Posts: 1
Location: Isle of Man
prikryl wrote:
Kevdog777 wrote:
All I am doing is:

1) dragging file1.txt from SCO (right hand side of WinSCP)
2) dropping file1.txt into the folder on my local machine - which was pre-created (left hand side of WinSCP)

Please start a new thread and attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. 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 may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.


Hi Martin,

Thanks for getting back to me. I have tried a few things, and was about to send you the log file, but my colleague thought it may be a corrupt file, which it was.

So there is no issue in WinSCP Mr. Green

By the way, it is a great product!
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