+ Reply to Thread
Results 1 to 13 of 13

Rename file when copied

  1. #1
    Registered User
    Join Date
    05-21-2013
    Location
    philippines
    MS-Off Ver
    Excel 2010
    Posts
    23

    Exclamation Rename file when copied

    Hi Experts!
    Need your help I just copied and modify this code;
    What I want is to add something on the file name, without changing, file path, original file name and file extension

    Say;

    I get the file

    D: \Docs\Memo.docx

    I can paste it to the fnpath with a changed filename

    C: \_Temp\ Memo_BPMC-0001.docx

    Heres the code

    Please Login or Register  to view this content.

    Any help will be highly appreciated
    Thanks in advance
    Last edited by zhaype; 07-08-2013 at 05:45 AM.

  2. #2
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: Rename file when copied

    Hi zhaype,

    Below codes will do the necessary things...

    Please Login or Register  to view this content.

    Regards
    taps

    **Note: If problem solved then mark the thread as "SOLVED" (see above) and add some reputations

  3. #3
    Registered User
    Join Date
    05-21-2013
    Location
    philippines
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Rename file when copied

    Thank you very much taps
    your genius
    just one request, can we not limit the file to .xls for the browsing form it only allows excel file,
    i should be browsing any type of file

  4. #4
    Registered User
    Join Date
    05-21-2013
    Location
    philippines
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Rename file when copied

    also sir taps, it should not change the file extension it should retain the same file type.
    thanks sooooooooo much
    Last edited by zhaype; 07-08-2013 at 07:56 PM.

  5. #5
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: Rename file when copied

    Hi,
    Please don't call me "sir", I am always a friend

    Use below modified code and it is doing all purpose.

    Please Login or Register  to view this content.

    Regards
    taps


    **Note: If problem solved then mark the thread as "SOLVED" (see above) and add some reputations
    Last edited by taps; 07-09-2013 at 03:19 AM.

  6. #6
    Registered User
    Join Date
    05-21-2013
    Location
    philippines
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Rename file when copied

    wow!!!!!!!!!!!!!!!!
    thank you very much taps!
    youre a hero!

  7. #7
    Registered User
    Join Date
    05-21-2013
    Location
    philippines
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Rename file when copied

    Hi Taps!
    I guess the code just needs a little tweaking from its master
    i tried running your codes to my form, i just need it to save in a common repository which is the "C:\CiMD\_Temp" but when i edited your code its no longer changing the file name

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: Rename file when copied

    Hi,

    Try below..
    Please Login or Register  to view this content.
    Note: I think you should start a new thread as this is a new problem and you would like to add above code within in your form.

    regards
    taps
    Last edited by taps; 07-09-2013 at 05:57 AM.

  9. #9
    Registered User
    Join Date
    05-21-2013
    Location
    philippines
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Rename file when copied

    hi,
    i just tried but i don't need to prompt for the destination folder it should automatically place the renamed file to a certain destination path.

  10. #10
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: Rename file when copied

    Hi,

    I have run your code and it is working fine in my system (I have just changed the path as "D:\TEST" and commented below part of code)
    Please Login or Register  to view this content.
    Could you please check if you have the right to save files in the folder you have mentioned above. i.e. check admin right.

    regards
    taps

  11. #11
    Registered User
    Join Date
    05-21-2013
    Location
    philippines
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Rename file when copied

    thanks taps
    ill just start a new thread as advised.

  12. #12
    Registered User
    Join Date
    05-21-2013
    Location
    philippines
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Rename file when copied

    hi taps,

    uploaded the file
    and here's the new thread

    http://www.excelforum.com/excel-gene...on-folder.html

    Thanks so much!
    Last edited by zhaype; 07-09-2013 at 06:42 AM.

  13. #13
    Registered User
    Join Date
    05-21-2013
    Location
    philippines
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Rename file when copied

    hi taps
    yes i have access to it

+ 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