title: Batch Reprojection Tool, creating a variable with no value
body: <p>This is for a school project. Questions regarding this project have been posted here previously (<a href="https://www.e-education.psu.edu/geog485/node/131" rel="nofollow">https://www.e-education.psu.edu/geog485/node/131</a>).</p>
  
  <p>My teacher provided Python code for the class to insert to our script. Essentially it's drops the ".shp" from a file name and then appends "_projected.shp" afterwards. Here's the code I was provided and have in my script: </p>
  
  <pre><code>    rootName = ""
      if currentFC.endswith(".shp"):
          rootName = currentFC[:-4]
          newFC = str(rootName) + "_projected.shp" 
  </code></pre>
  
  <p>Python is not liking the rootName variable's value (IOError: "" does not exist).
  Since this code was given to me, I figured it would work but I also may be making a rookie mistake thinking that's how the variable was suppose to be declared. </p>
  
  <p>I can provide the rest of my script if it is needed</p>
  
  <p>Here is the traceback:</p>
  
  <p>Traceback (most recent call last):
    File "C:\Python27\ArcGIS10.1\Lib\site-packages\pythonWin\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 325, in RunScript
      exec codeObject in <strong>main</strong>._<em>dict</em>_
    File "C:\Users\dan and kathryn\Desktop\school\programming\project2\project2.py", line 15, in 
      targetDesc = arcpy.Describe(targetFC)
    File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy__init__.py", line 1190, in Describe
      return gp.describe(value)
    File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\geoprocessing_base.py", line 374, in describe
      self._gp.Describe(*gp_fixargs(args, True)))
  IOError: "" does not exist</p>