Re: problem with special characters in file command?
- From: "Gerald W. Lester" <Gerald.Lester@xxxxxxx>
- Date: Sun, 29 Jun 2008 14:47:03 -0500
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?
Tcl should be able to handle anything the file system can handle.
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
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
.
- Follow-Ups:
- Re: problem with special characters in file command?
- From: M. Strobel
- Re: problem with special characters in file command?
- References:
- problem with special characters in file command?
- From: M. Strobel
- problem with special characters in file command?
- Prev by Date: Re: Limiting resources used by scripts on web server
- Next by Date: Re: tablelist: <Return> the same as <Tab> when editing.
- Previous by thread: problem with special characters in file command?
- Next by thread: Re: problem with special characters in file command?
- Index(es):
Relevant Pages
|