+ Reply to Thread
Results 1 to 9 of 9

move files to another folder delete original

  1. #1
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    move files to another folder delete original

    hello.

    i would like to be able to move files from one folder to another then delete the original files.
    I dont think im passsing the variables to the functions corectly.
    been trying this for a while now and cant get it.

    Please Login or Register  to view this content.
    and help would greatly be appresated.

    cheers
    Last edited by D_Rennie; 09-09-2009 at 12:05 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: move files to another folder delete original

    Check this page

    http://www.rondebruin.nl/folder.htm
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: move files to another folder delete original

    im still strugling. im thinking from the examples on the link, they are not to diffrent to what im trying.

    though becouse im using application.getopenfilename to select mutipul files. I figured that the files needed to be stored in a array and then loop through to deal with each seperate file. and this is where im lost the file name will change for however many times for the files in the array. from that im trying to extract the file name and file extention to be used for the new location naming.

    hope that makes sence.

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: move files to another folder delete original

    Hey D_Rennie

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    does this help?
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  5. #5
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: move files to another folder delete original

    hay pike how you going???

    It helped me to understand it better.

    i now got the filename and extention extracted fine though its the array that is stuffing me up
    Please Login or Register  to view this content.
    even this error out

    im about to scrap this idear and just use a groupe of cells for each complete filepath and extracted filepath.

    the reason that have tryed to get this to work so long is i aready had the array from attaching the files to a email so though the move wouldnt be to hard.

    Thankyou for the help.

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: move files to another folder delete original

    Hey D_Rennie

    any thing can be done

    what do you need
    1 select File
    and 2 move it

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: move files to another folder delete original

    Dude
    from Julitta Korol
    Please Login or Register  to view this content.

  8. #8
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: move files to another folder delete original

    Hay pike.

    Cheers for the code. I will use most of that for what im doing, It has some great error handling. What i was trying to do was use the getopenfile in an array.

    so where it has
    Please Login or Register  to view this content.
    The programing needed to get it working has getting the better or me.

    So the answer for this one is going to be what is a probley better way anyhow. This way i can store all the file information on a spreadsheat and use some of this within the email sendout.

    I will loop through the array and store the original file path in column A"aready tryed this and works fine. Also pull the file name+Ext and file size for column B & C. Then use the code you gave me to loop through the files from column A to transpher to a newley created folder. Kill the original files. Then use the thansphered files for attaching to a email"also done this works fine"

    So going this way it is quite simple and would have been done long ago. Though im like a fly in a horse padic when im trying somethink new, Cant get me off the ++++ until i figure it out, or the ++++ sumthers me.

    Ill mark solved, Though post back the code that i will run with.

    Cheers for all the help, Many thanks.

  9. #9
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: move files to another folder delete original

    Here is what i am going to run with, Just incase you where intrested.
    Cells D1-E1 must cointain text, and must not contain illegal charters /-? ect
    Note this will delete the original file after it is placed into the new folder.
    Please Login or Register  to view this content.

+ 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