Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Moving a file

Moving a file

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dave_long
    wrote on last edited by
    #1

    Hi what i want to accomplish is this: To transfer a file from one folder to another folder without having to do that manually. ie. open both folders and drag and drop, or copy and paste. What i want is to have a very basic console program or win based but preferably console based, that exists in the folder with the file and i just want to be able to drop the file on top of the console icon and for it to be sent to the destination folder. I need almost no user input just to drop the file on top of the icon to run the program to send the file to its destination folder. Anyone have anyi deas how i would go about doing this. im using VC++.NET environ. kind regards Dave Long

    N R 2 Replies Last reply
    0
    • D dave_long

      Hi what i want to accomplish is this: To transfer a file from one folder to another folder without having to do that manually. ie. open both folders and drag and drop, or copy and paste. What i want is to have a very basic console program or win based but preferably console based, that exists in the folder with the file and i just want to be able to drop the file on top of the console icon and for it to be sent to the destination folder. I need almost no user input just to drop the file on top of the icon to run the program to send the file to its destination folder. Anyone have anyi deas how i would go about doing this. im using VC++.NET environ. kind regards Dave Long

      N Offline
      N Offline
      Neville Franks
      wrote on last edited by
      #2

      Have a look at WM_DROPFILES. I haven't done much with console apps, but this is what you use in a Windows app. Also CWnd::OnDropFiles(). This is what I use in ED (see sig) if the user drops a file on it, whether it is running or not. Hope that helps. Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com

      1 Reply Last reply
      0
      • D dave_long

        Hi what i want to accomplish is this: To transfer a file from one folder to another folder without having to do that manually. ie. open both folders and drag and drop, or copy and paste. What i want is to have a very basic console program or win based but preferably console based, that exists in the folder with the file and i just want to be able to drop the file on top of the console icon and for it to be sent to the destination folder. I need almost no user input just to drop the file on top of the icon to run the program to send the file to its destination folder. Anyone have anyi deas how i would go about doing this. im using VC++.NET environ. kind regards Dave Long

        R Offline
        R Offline
        Rage
        wrote on last edited by
        #3

        IMO you will need a winapp to do this. A very easy way to do this is : Make a batch file (like the following, just replace [destination path] with your path.)

        @echo off

        if "%1" == "" goto end
        if not exist %1 goto end

        copy %1 [destination path]

        :end

        Put the batch file (name it mycopy.bat) iy your windows SendTo directory. Now every time you want to copy a file, right-click on it, go in the SendTo submenu and click on mycopy.bat. Your file will be copied. :cool: ~RaGE();

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups