Topic "Backup script special characters"

Author Message
namit
[View user's profile]

Joined: 2008-02-22
Posts: 7
Location: Ireland
Hey I have a script that backups my computer every night but it crashes out when i comes across any file that has special characters that are not English like Ukranian ones or ??? marks in them. How do i get around this?

It seams to come back with file does not exist skip(S) retry(R) abort(A) but it just aborts.

Thanks


# VPSLink Sample Backup Script for WinSCP
option exclude "*.mp4; *.lnk; *.exe; *.msi; My Pictures; My Music; My Videos; @college; .metadata;"

# Comment out the next two lines to test
option batch on
option confirm off

# Connect - format: user:password@host
open user:pass@server.org

# Force binary mode transfer
option transfer binary

# Download backup file to remote directory
synchronize remote F:\+myfiles\ /home/user/recent

# Disconnect
close

# Exit WinSCP
exit

only seams to happen with script not with GUI but can not schedule the gui to run every night.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Can you post a log file, both from GUI and the script?
_________________
Martin Prikryl
namit
[View user's profile]

Joined: 2008-02-22
Posts: 7
Location: Ireland
Code:

Backup started at 10/11/2008
exclude      *.mp4; *.lnk; *.exe; *.msi; My Pictures; My Music; My Videos; @college; .metadata; *.cab; *.exe; *.msi;
batch        on
confirm      off
Searching for host...
Connecting to host...
Authenticating...
Using username "test".
Authenticating with pre-entered password.
Authenticated.
Starting the session...

....
File or folder 'C:\Shared Docs\Update 21 April 2008\Shared Docs\Ukraine\13-17 ?ctober - Key Notes.doc' does not exist.
- Hide quoted text -
System Error.  Code: 123.
The filename, directory name, or volume label syntax is incorrect
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
Session 'test@server.server.org' closed.
No session.
Error: 09/11/2008


This is the output of script backup.

Thanks
namit
[View user's profile]

Joined: 2008-02-22
Posts: 7
Location: Ireland
Gui shows

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


but i would prefer to have it all scripted.
namit
[View user's profile]

Joined: 2008-02-22
Posts: 7
Location: Ireland
Think its this corrupt file problem i am coming across.

https://winscp.net/forum/viewtopic.php?t=3422

Has this been fixed, is there a way to set a skip option for corrupt files.

Thanks
namit
[View user's profile]

Joined: 2008-02-22
Posts: 7
Location: Ireland
I put in thing below to my script and it solved it for some copying

Code:
option exclude "*.mp4; *.lnk; *.exe; *.msi; My Pictures; My Music; My Videos; @college; .metadata; *.cab; *.exe; *.msi; *_?*; ~$?*; *-?*; Tatjana;"


but have a corrupt file that is called
Code:
???? ???? ?? .doc

but putting *?* just stops copying everything.

Think because ? is being picked up as a regex am i right?

If so is there a way of solving this and making it not come out as a regex.

Thanks again
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
namit wrote:
If so is there a way of solving this and making it not come out as a regex.

You can try to specify full file name "???? ???? ?? .doc" and hope it does not match another file. However I do not think that the question marks are actually question marks. So it may not help.
_________________
Martin Prikryl
namit
[View user's profile]

Joined: 2008-02-22
Posts: 7
Location: Ireland
Think its because the file is corrupted, is there a way in scripts like the gui to say if file name is two long or corrupt to skip over it and not abort?

Thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
namit wrote:
Think its because the file is corrupted, is there a way in scripts like the gui to say if file name is two long or corrupt to skip over it and not abort?

You can use "option batch continue".
_________________
Martin Prikryl
Anant

Guest


Hello,

when I am trying to login through winscp to remote system it is given me connection refused error
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Anant wrote:
when I am trying to login through winscp to remote system it is given me connection refused error

Sorry, your post does not include enough information.

Please read how to troubleshoot problems with WinSCP. If it turns out that you are not able to help yourself, read how to ask for support or report bugs efficiently, so others can help you.

Also start a new thread as I do not see any relation to this one.
_________________
Martin Prikryl
iannis

Guest


prikryl wrote:
namit wrote:
Think its because the file is corrupted, is there a way in scripts like the gui to say if file name is two long or corrupt to skip over it and not abort?

You can use "option batch continue".


I have exactly the same problem (code 123) with french accented characters in the filename. "Skip" button in the GUI works ok. However in the script, although "option batch continue" answers with "Skip", the script exits after that.

Version 4.3.6 build 1655.

Thanks for this great software!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
iannis wrote:
I have exactly the same problem (code 123) with french accented characters in the filename. "Skip" button in the GUI works ok. However in the script, although "option batch continue" answers with "Skip", the script exits after that.

Version 4.3.6 build 1655.

Can you try unicode 5.0.5 beta?
_________________
Martin Prikryl
Guest




prikryl wrote:
iannis wrote:
I have exactly the same problem (code 123) with french accented characters in the filename. "Skip" button in the GUI works ok. However in the script, although "option batch continue" answers with "Skip", the script exits after that.

Version 4.3.6 build 1655.

Can you try unicode 5.0.5 beta?


Problem solved in 5.0.5 beta, no more errors with Code 123.

Filenames with accents in unnicode encoding (the usual case) are synchronized without problem.

Some files, saved from mail attachments, contain accented letters not in unicode. These files are first deleted during synchronization ("synchronize remote -delete") and then transfered again; this happens in every synchronization. I had just to rename these files and type again the accented characters so that they become unicode and everything is fine now, they are synchronized only once.

Thanks again.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Thanks for your feedback!
_________________
Martin Prikryl
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