
nagarajsh
New User
Aug 11, 2009, 10:11 AM
Post #1 of 3
(2600 views)
|
|
An extra "!" get added
|
Can't Post
|
|
Hi, I have following script to find the newly created file in a directory and display the complete link to the file. $dir = "\\\\123.53.12.123\\ABC\\Reports\\EFG\\Details\\XYZ"; opendir (DIR, "$dir/"); @FILES = grep(/.xls/,readdir(DIR)); closedir (DIR); foreach $FILES (@FILES) { if (-M "$dir/$FILES" > 0) { $latest_xls = $FILES; } } ## ppt files opendir (DIR, "$dir/"); @FILES = grep(/.PPT/,readdir(DIR)); closedir (DIR); foreach $FILES (@FILES) { if (-M "$dir/$FILES" > 0) { $latest_ppt = $FILES; } } $EMAI_XLS = "file:\\\\123.53.12.123\\ABC\\Reports\\EFG\\Details\\XYZ\\$latest_xls"; $EMAIL_PPT = "file:\\\\123.53.12.123\\ABC\\Reports\\EFG\\Details\\XYZ\\$latest_ppt"; ## send mail with link $EMAI_XLS ,$EMAI_PPT I have around 20 files generated in different folders and the script send mail with 20 links. Now, the problem is daily 99% of the times all the files do open but one or the other file can not be opened from the link. when i move the mouse over the link, i see that the files which do not open has one extra "!" in the expansion. say the actual file is, \\123.53.12.123\ABC\Reports\\EFG\Details\XYZ\2009081112AM_iAmFile.xls, it would have become \\123.53.12.123\!ABC\Reports\\EFG\Details\XYZ\2009081112AM_iAmFile.xls. So when the file will give error when the recipient clicks on the link. Anything i am doing wrong? there is no particular file which is wrong always. it can be any of the 20 filesa dn it might open good on another system and might fail on someone else system. Any idea? thanks for the time and thanks in advance,
|