Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor sagars's Avatar
    Join Date
    Nov 2006
    Location
    Pune, india
    Posts
    186
    hi

    i have created one file a.txt,
    path= "c:\a.txt"
    f = codecs.open(path, 'w', 'utf_8')
    now i want to delete it through program , how could i do this ???


    thnks in advance

  2. #2
    Nokia Developer Moderator croozeus's Avatar
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,635
    Quote Originally Posted by sagars View Post
    hi

    i have created one file a.txt,
    path= "c:\a.txt"
    f = codecs.open(path, 'w', 'utf_8')
    now i want to delete it through program , how could i do this ???


    thnks in advance
    To delete a file use the below statements,

    Code:
    >>> import os
    >>> os.remove(path)
    Best Regards,
    Croozeus
    Pankaj Nathani
    www.croozeus.com

Similar Threads

  1. Delete file from mobile drive
    By chanchad_tejas in forum Python
    Replies: 1
    Last Post: 2007-11-13, 15:02
  2. delete a file
    By jmv_ in forum Symbian C++
    Replies: 3
    Last Post: 2007-09-04, 07:37
  3. could not find thread.mbg and thread.rsg
    By deercrane in forum Symbian C++
    Replies: 3
    Last Post: 2006-04-18, 09:44
  4. Unable to delete file
    By psfelix in forum General Development Questions
    Replies: 0
    Last Post: 2006-01-30, 11:19
  5. Help !about .mbm的形成
    By wangguoshui in forum Symbian
    Replies: 4
    Last Post: 2004-12-23, 03:37

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved