Re: problem with special characters in file command?
- From: "M. Strobel" <sorry_no_mail_here@xxxxxxxxxxx>
- Date: Mon, 30 Jun 2008 00:26:05 +0200
Gerald W. Lester schrieb:
M. Strobel wrote:Hi,
I am writing a script that works on files uploaded via FTP. The uploading system is coding a lot of info into the filename, they get really weird.
Now I get a problem with [file rootname] and [file exists] even in plain tclsh.
What is the exact "problem" you are getting?
I scan a directory for *.wav files, then I check for the existence of a corresponding .xml file. The file is there, but is not found.
See the lines "set f ..." and "set fjob ...", then "file readable .."
Tcl should be able to handle anything the file system can handle.
Exactly what I think, but not what I experience in this case.
.
Test session: (the file name is wrapped, there is a space in it, should not be the problem)
-------------------------------------------------------------------------------
% set f [lindex [glob *.wav] 0]
2$wav@@4$27-06-2008@@6$00$06@@7$27-06-2008 08$45$34@@8$²²@@29$24@@91$!QBLFUX0M@@31$1@@28$0@@.wav
% ls -l
insgesamt 52
-rw-rw-r-- 1 dictanet users 49025 27. Jun 08:46 2$wav@@4$27-06-2008@@6$00$06@@7$27-06-2008 08$45$34@@8$??@@29$24@@91$!QBLFUX0M@@31$1@@28$0@@.wav
-rw-rw-r-- 1 strobel users 97 27. Jun 08:46 2$wav@@4$27-06-2008@@6$00$06@@7$27-06-2008 08$45$34@@8$??@@29$24@@91$!QBLFUX0M@@31$1@@28$0@@.xml
% set fjob "[file rootname $f].xml"
2$wav@@4$27-06-2008@@6$00$06@@7$27-06-2008 08$45$34@@8$²²@@29$24@@91$!QBLFUX0M@@31$1@@28$0@@.xml
% file readable $fjob
0
% set tcl_version
8.4
----------------------------------------------------------------
It happens on Suse 10.2, file system is ext3.
Max
- Follow-Ups:
- Re: problem with special characters in file command?
- From: billposer
- Re: problem with special characters in file command?
- References:
- problem with special characters in file command?
- From: M. Strobel
- Re: problem with special characters in file command?
- From: Gerald W. Lester
- problem with special characters in file command?
- Prev by Date: Re: tablelist: <Return> the same as <Tab> when editing.
- Next by Date: Re: problem with special characters in file command?
- Previous by thread: Re: problem with special characters in file command?
- Next by thread: Re: problem with special characters in file command?
- Index(es):
Relevant Pages
|