+ Reply to Thread
Results 1 to 8 of 8

delete csv file with same name as xls file

  1. #1
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723

    delete csv file with same name as xls file

    hi ,

    i download csv files daily and transfer the data to an xls file and mofify the data then save the xls file with the same name as the CSV file

    this is the code that i use to save the new Xls file with the same name.

    can you please look at the code i use and could ot be modified to delete the CSV File

    thanks
    steve


    Please Login or Register  to view this content.
    Last edited by stevekirk; 10-05-2012 at 09:22 PM.

  2. #2
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: delete csv file with same name as xls file

    Hi stevekirk,

    I guess there is nothing wrong in your code.
    That code only makes a copy of CSV file with a ".xls" extension and does not delete your CSV file.
    All you need is a an additional code to delete your CSV file.

    Regards,
    thisisgerald
    Don't forget to mark your thread as [SOLVED].

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: delete csv file with same name as xls file

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723

    Re: delete csv file with same name as xls file

    hi andy,

    i am getting an error cannot find file, it ssems it is not seeing the CSV

    Steve

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: delete csv file with same name as xls file

    Is the csv in the same folder as the newly saved workbook? where ever sPath is referring too.

  6. #6
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723

    Re: delete csv file with same name as xls file

    yes ,

    same folder etc

  7. #7
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723

    Re: delete csv file with same name as xls file

    Andy,

    this is the code i am using , hope it helps, albeit all over the place

    Please Login or Register  to view this content.

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: delete csv file with same name as xls file

    Try this code, it will report the file it is trying to delete if it is not found.

    Please Login or Register  to view this content.
    Confirm the folder location and filename are correct.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1