Hello everyone, i have a problem with my point shapefiles in which i implement a big procession. The problem is that although all the shapefiles have the same columns there is one which starts with "P500" AND continues differently to each one which in some it is sort ascended and in others sort descended. Is there a way with python where i can sort ascend this column for every point file by using "P500" as wildcard. I tried it but my FID changed also causing me problems.
In some shp i have this and in some other this(problem) and i want it to be like the first two columns
FID PNT500B FID PNT500C20
0 0 0 3
1 1 1 2
2 2 2 1
3 3 3 0
This is the code i have written but it doesn't work properly
<SPAN class="kwd" style="color: #8a4a0b;">import</SPAN><SPAN class="pln" style="color: #000000;"> arcpy
</SPAN><SPAN class="kwd" style="color: #8a4a0b;">from</SPAN><SPAN class="pln" style="color: #000000;"> arcpy </SPAN><SPAN class="kwd" style="color: #8a4a0b;">import</SPAN><SPAN class="pln" style="color: #000000;"> env
arcpy</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">env</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">workspace </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">"c:/Bo/Well/Point"</SPAN><SPAN class="pln" style="color: #000000;">
fcs </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> arcpy</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="typ" style="color: #2b91af;">ListFeatureClasses</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="str" style="color: #800000;">"samp*"</SPAN><SPAN class="pun" style="color: #145680;">,</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">"point"</SPAN><SPAN class="pun" style="color: #145680;">)</SPAN><SPAN class="pln" style="color: #000000;">
fields </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> arcpy</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="typ" style="color: #2b91af;">ListFields</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="pln" style="color: #000000;">fcs</SPAN><SPAN class="pun" style="color: #145680;">,</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">"P500*"</SPAN><SPAN class="pun" style="color: #145680;">,</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">"Double"</SPAN><SPAN class="pun" style="color: #145680;">)</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="kwd" style="color: #8a4a0b;">for</SPAN><SPAN class="pln" style="color: #000000;"> fc </SPAN><SPAN class="kwd" style="color: #8a4a0b;">in</SPAN><SPAN class="pln" style="color: #000000;"> fcs</SPAN><SPAN class="pun" style="color: #145680;">:</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="kwd" style="color: #8a4a0b;">for</SPAN><SPAN class="pln" style="color: #000000;"> fiel </SPAN><SPAN class="kwd" style="color: #8a4a0b;">in</SPAN><SPAN class="pln" style="color: #000000;"> fields</SPAN><SPAN class="pun" style="color: #145680;">:</SPAN><SPAN class="pln" style="color: #000000;">
arcpy</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="typ" style="color: #2b91af;">Sort_management</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="pln" style="color: #000000;">fc</SPAN><SPAN class="pun" style="color: #145680;">,</SPAN><SPAN class="pln" style="color: #000000;"> fc_sort</SPAN><SPAN class="pun" style="color: #145680;">,</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">[[</SPAN><SPAN class="pln" style="color: #000000;">fiel</SPAN><SPAN class="pun" style="color: #145680;">,</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">"ASCENDING"</SPAN><SPAN class="pun" style="color: #145680;">]])</SPAN>