Group:  Microsoft Access » microsoft.public.access.modulescoding
Thread: Name strSource As strTarget

Geek News

Name strSource As strTarget
jbassett[ at ]cpiaz.com 12/2/2008 6:09:18 PM
P.S.

I am also not married to using the following code, or the logic behind
it, to create the new file:

Name strSource As strTarget

as I just realized that this line was moving, rather than creating a
copy, of my file.

Thank you,

Jeff Bassett
Re: Name strSource As strTarget
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_gmail.com> 12/2/2008 6:17:53 PM
What are typical values for strSource and strTarget?

From the Help file:

Both newpathname and oldpathname must be on the same drive. If the path in
newpathname exists and is different from the path in oldpathname, the Name
statement moves the file to the new directory or folder and renames the
file, if necessary. If newpathname and oldpathname have different paths and
the same file name, Name moves the file to the new location and leaves the
file name unchanged.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


<jbassett[ at ]cpiaz.com> wrote in message
news:7455cae8-747f-40cc-af9b-2990622ef9d6[ at ]l33g2000pri.googlegroups.com...
[Quoted Text]
> P.S.
>
> I am also not married to using the following code, or the logic behind
> it, to create the new file:
>
> Name strSource As strTarget
>
> as I just realized that this line was moving, rather than creating a
> copy, of my file.
>
> Thank you,
>
> Jeff Bassett


Re: Name strSource As strTarget
Jeff Bassett <jbassett[ at ]cpiaz.com> 12/2/2008 6:36:41 PM
Doug:

Thank you and your quicker then I am. I meant for this post to be
under a different thread rather than a new thread.

You are, of course, correct in that it moves the file. The
oldpathname will vary but should usually be confined to a single
shared drive on the network. The newpathname will be constant as I am
trying to centralize my photos in a spot that my users cannot screw up
heance the newpathname will be an UNC path.

However, the real delima is that I do not want to move the file. I
would like to copy the file to the new location.

See this thread for the code that I am using:
http://groups.google.com/group/microsoft.public.access.modulescoding/browse_thread/thread/623149fa0e7705ad/d527cf6bde387ebf?hl=en#d527cf6bde387ebf

Thank you,

Jeff Bassett

Re: Name strSource As strTarget
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_gmail.com> 12/2/2008 6:42:26 PM
Use

FileCopy strSource, strTarget

instead

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Jeff Bassett" <jbassett[ at ]cpiaz.com> wrote in message
news:431388da-d811-4976-9c1f-6bbcb3e6c58c[ at ]r36g2000prf.googlegroups.com...
[Quoted Text]
> Doug:
>
> Thank you and your quicker then I am. I meant for this post to be
> under a different thread rather than a new thread.
>
> You are, of course, correct in that it moves the file. The
> oldpathname will vary but should usually be confined to a single
> shared drive on the network. The newpathname will be constant as I am
> trying to centralize my photos in a spot that my users cannot screw up
> heance the newpathname will be an UNC path.
>
> However, the real delima is that I do not want to move the file. I
> would like to copy the file to the new location.
>
> See this thread for the code that I am using:
> http://groups.google.com/group/microsoft.public.access.modulescoding/browse_thread/thread/623149fa0e7705ad/d527cf6bde387ebf?hl=en#d527cf6bde387ebf
>
> Thank you,
>
> Jeff Bassett
>


Re: Name strSource As strTarget
Jeff Bassett <jbassett[ at ]cpiaz.com> 12/2/2008 7:33:42 PM
On Dec 2, 11:42 am, "Douglas J. Steele"
<NOSPAM_djsteele[ at ]NOSPAM_gmail.com> wrote:
[Quoted Text]
> Use
>
> FileCopy strSource, strTarget
>
> instead
>
> --
> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> (no e-mails, please!)
>
> "Jeff Bassett" <jbass...[ at ]cpiaz.com> wrote in message
>
> news:431388da-d811-4976-9c1f-6bbcb3e6c58c[ at ]r36g2000prf.googlegroups.com...
>
>
>
> > Doug:
>
> > Thank you and your quicker then I am.  I meant for this post to be
> > under a different thread rather than a new thread.
>
> > You are, of course, correct in that it moves the file.  The
> > oldpathname will vary but should usually be confined to a single
> > shared drive on the network.  The newpathname will be constant as I am
> > trying to centralize my photos in a spot that my users cannot screw up
> > heance the newpathname will be an UNC path.
>
> > However, the real delima is that I do not want to move the file.  I
> > would like to copy the file to the new location.
>
> > See this thread for the code that I am using:
> >http://groups.google.com/group/microsoft.public.access.modulescoding/...
>
> > Thank you,
>
> > Jeff Bassett- Hide quoted text -
>
> - Show quoted text -

Thank you.

Your help is greatly appreciated.

Jeff

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net