1 Replies - 2842 Views - Last Post: 05 March 2010 - 06:15 AM Rate Topic: -----

#1 Bonded  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 05-March 10

Copy a picture to another folder

Posted 05 March 2010 - 05:32 AM

I was writing a program and I need to copy the pictures uploaded in the form to another folder in the application path, but tyhe prob is I do not know how to use the "FileCopy" syntax. Can Anyone assist me?

All is get is:

Private sub CmdSavePic_Click()
call Filecopy(Source as string, Target as String)
end sub

I used the commondiaolg1.filename as source; and App.path & "\Uploads" as Target but it won't work.

Is This A Good Question/Topic? 0
  • +

Replies To: Copy a picture to another folder

#2 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: Copy a picture to another folder

Posted 05 March 2010 - 06:15 AM

both source and destination need to be a fully qualified path AND file name... C:\A\MyImage.bmp, C:\Program Files\MyApp\Uploads\MyImage.bmp...

However, if you are on vista or 7 then you cannot use the program files path as it is protected by the OS, you would need to use the environ("appdata") path instead and/or if you have not created the uploads directory, then you will need to create it with mkdir...



Good Luck
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1