Moving files/deleting files/ copying, etc

This is a discussion on Moving files/deleting files/ copying, etc within the C++ Programming forums, part of the General Programming Boards category; Code: #include <iostream.h> #include <cstdlib.h> using namespace std; int main(){/* #ifdef _WIN32 if (!system("copy C:\Progra~1\WCRobot\*.* C:\Borland")) cout << "SENT"; else ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    155

    Moving files/deleting files/ copying, etc

    Code:
    #include <iostream.h>
    #include <cstdlib.h>
    
    using namespace std;
    
    
    int main(){/*
    #ifdef _WIN32
    if (!system("copy C:\\Progra~1\\WCRobot\\*.* C:\\Borland"))
    	cout << "SENT";
    else
    cout << "<mod-snipped>";
    #endif*/
    
    move ("C:\\Progra~1\\WCRobot\\*.*", "C:\\Borland");
    return 0;
    }
    This is just an example, but I already know how to use system() correctly but it invokes a shell-like environment. I was curious if there is syntax for a move/delete/copy/etc function like I wrote above:

    move ("C:\\Progra~1\\WCRobot\\*.*", "C:\\Borland");

    that works (this one does not), anyone know the syntax/includes?

  2. #2
    Registered User
    Join Date
    Oct 2002
    Posts
    155
    Anyone?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. XP/Vista - renaming, moving & deleting files
    By Tigers! in forum Windows Programming
    Replies: 4
    Last Post: 06-28-2009, 06:21 PM
  2. Copying Binary Files
    By mikeman118 in forum C++ Programming
    Replies: 9
    Last Post: 08-11-2007, 11:55 PM
  3. moving files in C
    By bentes in forum C Programming
    Replies: 6
    Last Post: 08-01-2007, 11:48 AM
  4. reinserting htm files into chm help files
    By verb in forum Windows Programming
    Replies: 0
    Last Post: 02-15-2002, 09:35 AM
  5. copying files
    By gls in forum C Programming
    Replies: 16
    Last Post: 09-06-2001, 01:14 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21