Results 1 to 5 of 5
  1. #1
    tcheck is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    131

    Move and rename File after entering into Access

    We track pdf reports that are entered into an Access database but are put into an inital directory that is open to the intranet (so users can get an idea of what the report is) and then copied into a different directory that we wil provide to internet users via IIS that has a unique id. I would like to build a batch file process to copy from the intranet directory to the internet directory after the information is entered into the database.



    Any ideas?

    Thanks in adavance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Google: Access VBA filesystemobject

    http://www.anysitesupport.com/access...to-copy-files/
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    tcheck is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    131
    Thanks. I tried the code and it errored out on rst!FileExt so I researched and found this site http://www.devhut.net/2010/09/27/ms-access-vba-rename-file/ it is much easier and works great.

    My next question is how to copy directories with a space in the name. An example is Name "C:\Old Dir\Old FileName.txt" As "C:\New Dir\NewF ileName.txt"

    What do I replace the spaces with?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    The spaces should not be an issue. Doesn't cause me any problems.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    tcheck is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    131
    Thanks. I tried it again and did not have issues. Must have had the incorrect file name.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 21
    Last Post: 08-20-2012, 11:59 PM
  2. Using Access to move Outlook Emails
    By crowegreg in forum Access
    Replies: 1
    Last Post: 09-28-2011, 02:25 PM
  3. Replies: 2
    Last Post: 10-11-2010, 03:15 AM
  4. Have access rename a .txt file and move it
    By dh010010 in forum Programming
    Replies: 5
    Last Post: 07-22-2010, 10:49 AM
  5. Replies: 1
    Last Post: 05-13-2010, 10:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums