Hi All,Below is the perl script for setting EA on output file. Generation of the file is working fine, but on checking the properties it does not show me the attribute "Title" as mentioned the script.###################Setting Extended Atrributes#############[html]<br>my $iw_home = TeamSite::Config::iwgethome();<br>my $iw_mount = TeamSite::Config::iwgetmount();<br>use TeamSite::Config;<br>my $ofile = iwpt_get_ofile_name();<br>$ofile = iwpt_get_ofile_name();<br> if (! -f $ofile){<br> if (open(OUT, ">$ofile")){<br> close(OUT);<br> }<br> else {<br> }<br> }<br>open(MYFILE, ">$ofile"); #We have to create our output file before setting the attributes<br>close(MYFILE);<br>my $iwextattr = "$iwhome/bin/iwextattr.exe"; <br>$attrib = iwpt_dcr_value('dcr.AllProduct.ProductTitle');<br><br>system("$iwextattr -s \"Title=\"$attrib\" \"$ofile\"");<br><br>[/html]####################################################Could someone pleae help in fixing the issue.Regards,Ace.TS6.1 / Sol9
system("$iwextattr -s \"Title=\"$attrib\" \"$ofile\"");
system(qq($iwextattr -s "Title=$attrib" "$ofile"));
Please learn how to format code for posting and how to preview posts before posting to ensure that they look correct.You seem to have a problem understanding how to properly quote command line arguments - specifically:system("$iwextattr -s \"Title=\"$attrib\" \"$ofile\"");Personally - I prefer:system(qq($iwextattr -s "Title=$attrib" "$ofile"));
Hi Ghoti,I tried your suggestion but unfortunately, no success in setting EA for the file.Below is the code used to do so:[html]<br>my $iw_home = TeamSite::Config::iwgethome();<br>my $iw_mount = TeamSite::Config::iwgetmount();<br>use TeamSite::Config;<br>my $ofile = iwpt_get_ofile_name();<br>$ofile = iwpt_get_ofile_name();<br> if (! -f $ofile){<br> if (open(OUT, ">$ofile")){<br> close(OUT);<br> }<br> else {<br> #;<br> }<br> }<br>open(MYFILE, ">$ofile"); #We have to create our output file before setting the attributes<br>close(MYFILE);<br>my $iwextattr = "$iw_home/bin/iwextattr.exe"; <br>$attrib = iwpt_dcr_value('dcr.AllProduct.ProductTitle');<br><br>system("$iwextattr -s \"Title=\"$attrib\" \"$ofile\"");<br>#system(qq($iwextattr -s Title="$attrib" $ofile));<br>[/html]Please let me know, if I am missing something.Regards,Ace
system("$iwextattr -s \"Title=\"$attrib\" \"$ofile\"");#system(qq($iwextattr -s Title="$attrib" $ofile));
#system(qq($iwextattr -s Title="$attrib" $ofile)); - yours linesystem(qq($iwextattr -s "Title=$attrib" "$ofile")); - Suggested way