Need help with copying of Adobe Acrobat .pdf Files!

This is a discussion on Need help with copying of Adobe Acrobat .pdf Files! within the C++ Programming forums, part of the General Programming Boards category; Hi! Can somebody help me with this Problem? I need to copy an Adobe Acrobat .pdf file from CD-ROM to ...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    3

    Question Need help with copying of Adobe Acrobat .pdf Files!

    Hi!
    Can somebody help me with this Problem?
    I need to copy an Adobe Acrobat .pdf file from CD-ROM to an specific folder! Further i have to rename it an i have to backup the already exsisting old file and copy it to another location!
    Please this is important and I need help
    Thx...

  2. #2
    Registered User programmer's Avatar
    Join Date
    Oct 2001
    Posts
    22
    Well you know what i would do , is simply copy or drag the .pdf file from the cd-rom and then just paste in the folder ... and then simply re-name the file by clickin' right click on the file OR opening the file through Acrobat reader and saving it as a new name ..... did i answer your question ?

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    3
    No you do not... because I need it in C++ because this a kind of homework for my studies!!!
    Please can somebody help?

  4. #4
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    file functions tend to be operating system specific. Maybe you could enlighten us as to the operating system you are using.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  5. #5
    Registered User
    Join Date
    Dec 2001
    Posts
    3
    I'm using Visual C++ 6.0 Standart Edition on Windows 2000!!!
    Is this enough information?

  6. #6
    Registered User
    Join Date
    Nov 2001
    Posts
    53
    You could just use system calls for it all.. it's a little nasty but if you're the only one using it (ie. os doesn't matter) and speed of the program is not an issue, i'd go for that option.

    You know what i mean, right?

    Code:
    system("whatever you'd type at the dos prompt");
    
    // eg.
    
    system("copy d:\file.ext c:\file.ext");
    system("rename c:\file.ext c:\newname.ext");
    Is that what you are after?

    Almosthere
    Last edited by almost_here; 12-06-2001 at 11:29 AM.
    "Technology has merely provided us with a more efficient means for going backwards" - Aldous Huxley

  7. #7
    zen
    zen is offline
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    Something like -

    Code:
    #include <windows.h>
    
    
    int main()
    {
    	BOOL bWorked;
    
    	//copy from cd
    	bWorked = CopyFile("D:\\your.pdf","C:\\your.pdf",FALSE);
    
    	//change name leaving original as it is
    	if(bWorked)
    		bWorked = CopyFile("D:\\newname.pdf","D:\\your.pdf",FALSE);
    
    	if(bWorked)
    		MessageBox(0,"Sucess!!","Outcome",0);
    	else
    		MessageBox(0,"Failed!!","Outcome",0);
    
    	return 0;
    
    }
    zen

  8. #8
    Registered User
    Join Date
    Nov 2001
    Posts
    53
    (hmm... maybe i should have thought about my last post for longer... why was i even copying and then renaming?? geeeeez i think i'm getting tired .. )

    "Technology has merely provided us with a more efficient means for going backwards" - Aldous Huxley

  9. #9
    Unregistered
    Guest

    Wink

    Thanks for help i think i have it now!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. copying files
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 03-08-2002, 03:41 AM
  2. reinserting htm files into chm help files
    By verb in forum Windows Programming
    Replies: 0
    Last Post: 02-15-2002, 09:35 AM
  3. Adobe Photoshop hogging *.asp files
    By Yoshi in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 01-06-2002, 01:11 PM
  4. displaying text files, wierd thing :(
    By Gades in forum C Programming
    Replies: 2
    Last Post: 11-20-2001, 05:18 PM
  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