URL Access Scripting- File Naming Problems
URL Access Scripting- File Naming Problems
- Subject: URL Access Scripting- File Naming Problems
- From: Jean Létourneau <email@hidden>
- Date: Tue, 18 May 2004 08:30:18 -0400
Hello Scripters !
I am trying to use URLAS to upload files to our local FTP site. The scripts
works OK with Fetch 3.xx or 4.xx . I'm trying to use URLAS instead since it
will be deployed on 100 or more laptops. There is some licensing
considerations.
Other considerations :
- FTP server ASIP 6.31(Mac OS 9.1 US)
- Clients all OS 9.2.2 FU (French Universal)
- I would like to upload accentuated file names.
The problem is with some file names URLAS returns error -37 : Bad name for a
file.
I made this script to test different file names.
on open (TheseFiles)
set ListOfResults to {["File Name", "Error Number"]}
repeat with ThisFile in TheseFiles
try
tell application "Pilotage d9acces URL"
activate
upload ThisFile to "
ftp://admin:email@hidden/Data/",
replacing yes with progress and binhexing
end tell
-- MT Get Name extracts name of file from a path
set the end of ListOfResults to [MT Get Name ThisFile, 0]
on error ErrMessage number ErrNumber
set the end of ListOfResults to [MT Get Name ThisFile, ErrNumber]
end try
end repeat
-- Write tab delimited report file
set ReportFile to (path to me) & ".rep" as string
MT Write File (MT Join List (ListOfResults)) to file ReportFile
tell application "Pilotage d9acces URL" to quit
end open
The report file contents:
Please take note:
-error number 0 means no error
-the <a> just before Noel should be ascii character 136 (a grave)
-the <e> in Noel should be ascii character 145 (e dieresis)
-the <e> in last 2 file should be ascii character 142 (e acute)
File Name Error Number
L'amour a Noel le 25- 0
L'amour a Noel le 25-12 0
L'amour a Noel le 25-12- -37
L'amour a Noel le 25-12-2004 -37
1234567890123456789012345678901 0
123456789012345678901234567890e 0
123456789012345e789012345678901 -37
Quite mind boggling! Adding a dash to the 2nd file name makes it
incompatible. !@#? I was suspecting that URLAS is encoding the name, making
it longer than 31 characters on the server side. So I used a 31 character
file name which transferred OK (this is the 5th file). Replacing the last
<1> by an e acute still works! But replacing the middle <6> by the same e
acute does not!#@?!
The easy fix is to un-accentuate all characters, but this is a shame for a
French publishing company, pardonnez-moi! I am looking for a better
solution.
To test further, I have made a script to upload a set of individual files
with this naming convention:
- ascii number occupying 3 characters
- a space
- the ascii character itself
- and another space.
All files with ascii characters 32 to 255 uploaded OK.(Except ascii 58 =
":", of course).
Other unsuccessful attempts : Try to change regional settings such as date,
hours, keyboard, text or numbers.
Any help would be gladly apprciated.
Jean Letourneau
email@hidden
-- This Jean should spell his last name with an e acute !
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.