Skip to main content
Solved

Remove Subfolders with Python


danilo_fme
Evangelist
Forum|alt.badge.img+45

Hello,

Waht is wrong my code python? My idea is : i have a directory with subfolder and i need to delete them.

My test into script to delete just one subfolder.

import fme
import fmeobjects
import os


def existe(feature):
    existesim = str
    existe = os.path.exists('C://Suportes//2016//PRODAM//Fanout_Cesar//ver//ANHANGUERA/') 
    feature.setAttribute('existesim', existe) 
    os.remove('C:/Suportes/2016/PRODAM/Fanout_Cesar/ver/ANHANGUERA')
    pass

Thanks in Advance,

Best answer by takashi

Please see the Python documentation, always when you write a script ;)

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Influencer
  • Best Answer
  • January 7, 2016

Please see the Python documentation, always when you write a script ;)


danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Author
  • Evangelist
  • January 7, 2016

@takashi Thanks again :)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings