Author |
Message |
(Deactived B l a h e r) BiLinux User I can take it both ways
Age:34 Gender: Joined: Mar 25 2005 Posts: 341 Location: East Sparta, Ohio Offline
|
Posted: Sat Nov 12, 2005 7:54 pm Post maybe stupid Post subject: Copying Directory's in C/C++ or atleast Java-Script |
 |
|
|
|
I'm trying to make a webbot for my webhosting services where the customer fills out a form and when submitted the web bot will take those values and do functions with it. But I have a form that give a value rather or not if they want forums added to there domain. The problem is I need the bot if the value equals "1" to copy a directory on my server and paste it in the domain that is already wrote in. But I don't know what the commands are for C/C++ or even Java-Script to copy and/or paste a directory or a file. If any body can help me please tell.
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sat Nov 12, 2005 8:04 pm Post maybe stupid Post subject: |
 |
|
|
|
CopyFile() copies a file, but I don't think it works on a folder. You may need to create the new folder, iterate through all files, and copy them individually.
CreateDirectory()
FindFirstFile()
FindNextFile()
FindClose()
CopyFile() _________________ 4,691 irradiated haggis!
|
|
Back to top |
|
 |
(Deactived B l a h e r) BiLinux User I can take it both ways
Age:34 Gender: Joined: Mar 25 2005 Posts: 341 Location: East Sparta, Ohio Offline
|
Posted: Sat Nov 12, 2005 8:14 pm Post maybe stupid Post subject: |
 |
|
|
|
Ok wow that's alot of CopyFile()'s for the Same Php forums that MGB uses. But thank you but once I CopyFile() how do I get from that Copy to the server (Let me Guess PasteFile("C:\Documents and Settings\Owner\Desktop\"stzDomain)?)
|
|
Back to top |
|
 |
Quan Chi2 Member of "Sexy Teenagers that Code" Group

Age:34 Gender: Joined: Mar 25 2005 Posts: 860 Location: NYC Offline
|
Posted: Sat Nov 12, 2005 8:18 pm Post maybe stupid Post subject: |
 |
|
|
|
That might be right. Try it?
http://www.phpfreaks.com/
go there. it might have something to help. It helped me alot while learning.
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sat Nov 12, 2005 8:36 pm Post maybe stupid Post subject: |
 |
|
|
|
This is not copy as in copy-paste. The CopyFile() function takes a FROM and a TO.
|
|
Back to top |
|
 |
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.

Age:37 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Sat Nov 12, 2005 8:56 pm Post maybe stupid Post subject: |
 |
|
|
|
Ehh, Ekted, do you even have any idea what this kid is trying to do?
|
|
Back to top |
|
 |
(Deactived B l a h e r) BiLinux User I can take it both ways
Age:34 Gender: Joined: Mar 25 2005 Posts: 341 Location: East Sparta, Ohio Offline
|
Posted: Sat Nov 12, 2005 9:06 pm Post maybe stupid Post subject: |
 |
|
|
|
Mr Ekted wrote: | This is not copy as in copy-paste. The CopyFile() function takes a FROM and a TO. |
All opps I was just thinking about that from copying and pasting at the moment, but can you give me a example of CopyFile() in use to give me better detail, like do you sperate the "from" to the "to" with a "," I'm still a bit sketchy with my "int main"'s and ()'s for after functions and things revativly around that area. I'm just used to another code.
As for you Solo I don't know what your talking about. Rather you don't know C, your just trying to put your place in another one of my threads, your saying I have no sense, or your really asking Ekted what I'm making is a mass productive web hosting service and your amazed (which I highly doubt)
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sat Nov 12, 2005 11:55 pm Post maybe stupid Post subject: |
 |
|
|
|
blah-er wrote: | All opps I was just thinking about that from copying and pasting at the moment, but can you give me a example of CopyFile() in use to give me better detail, like do you sperate the "from" to the "to" with a "," I'm still a bit sketchy with my "int main"'s and ()'s for after functions and things revativly around that area. I'm just used to another code. |
You really should learn C syntax and functionality before working on something productive. If you don't understand what a function is, then you are not ready to program in any language.
CopyFile("c:\\Documents\\from.doc", "c:\\Documents\\to.doc", FALSE);
|
|
Back to top |
|
 |
(Deactived B l a h e r) BiLinux User I can take it both ways
Age:34 Gender: Joined: Mar 25 2005 Posts: 341 Location: East Sparta, Ohio Offline
|
Posted: Sun Nov 13, 2005 7:53 am Post maybe stupid Post subject: |
 |
|
|
|
Mr Ekted wrote: | [..]
You really should learn C syntax and functionality before working on something productive. If you don't understand what a function is, then you are not ready to program in any language.
CopyFile("c:\\Documents\\from.doc", "c:\\Documents\\to.doc", FALSE); |
Yes I know I'm not that good with funtions. But was taking the forever loop finction (for (; ; ); ) into considerations but that didn't seem that right. (Dang'it I forgot about the windows conflict directory \'s.) As I said somewhere eles I only know the basics and the header files that are needed. The toughest program I have really made is a COnversion program that takes Far. into Celcius and maybe have edited some bot plug-ins for the theme of my zone.
|
|
Back to top |
|
 |
Quan Chi2 Member of "Sexy Teenagers that Code" Group

Age:34 Gender: Joined: Mar 25 2005 Posts: 860 Location: NYC Offline
|
Posted: Sun Nov 13, 2005 8:07 am Post maybe stupid Post subject: |
 |
|
|
|
http://cprogramming.com/ <--teaches you about functions.
You can also try to get the pdf file for C programming for Dummies.
|
|
Back to top |
|
 |
(Deactived B l a h e r) BiLinux User I can take it both ways
Age:34 Gender: Joined: Mar 25 2005 Posts: 341 Location: East Sparta, Ohio Offline
|
Posted: Sun Nov 13, 2005 8:14 am Post maybe stupid Post subject: |
 |
|
|
|
Quan Chi2 wrote: | http://cprogramming.com/ <--teaches you about functions.
You can also try to get the pdf file for C programming for Dummies. | Quan I already have a "C++ For Dummy's book 4th Edition" where it starts with the basics of C and moves up. I just havn't found time to read it since it's a long book and I like to re-read some things to get a better understanding. It's a good reference book by the way if anybody needs one.
*stares at post below and wounders if he just answered this problem*
Last edited by (Deactived B l a h e r) on Sun Nov 13, 2005 8:17 am, edited 1 time in total |
|
Back to top |
|
 |
Default Server Help Squatter

Age:44 Gender: Joined: Aug 25 2005 Posts: 286 Offline
|
|
Back to top |
|
 |
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.

Age:37 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Sun Nov 13, 2005 8:27 am Post maybe stupid Post subject: |
 |
|
|
|
No blah-er, I was asking Ekted if he had any clue what you were trying to do code-wise, because you don't, obviously.
|
|
Back to top |
|
 |
(Deactived B l a h e r) BiLinux User I can take it both ways
Age:34 Gender: Joined: Mar 25 2005 Posts: 341 Location: East Sparta, Ohio Offline
|
Posted: Sun Nov 13, 2005 8:57 am Post maybe stupid Post subject: |
 |
|
|
|
Solo Ace wrote: | No blah-er, I was asking Ekted if he had any clue what you were trying to do code-wise, because you don't, obviously. |
You obviously don't have any clue the on how forms work and that you need to take those values and make them do somthing. You can't make those values automatically do somthing unless you have a script for them. The unfinsihed example is in the file below, just read the HTML through text.
Html in .txt
Filloutform.txt - 30.84 KB
File downloaded or viewed 19 time(s)
|
|
Back to top |
|
 |
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.

Age:37 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Sun Nov 13, 2005 9:33 am Post maybe stupid Post subject: |
 |
|
|
|
Sigh...
How can you tell from what I posted here that I don't know how forms on the web work?
Indeed, you can't.
You still didn't show what you're trying to do code-wise.
Using CopyFile isn't going to help you if you don't know how to implement it, which is why I asked.
But... I guess you are just offended by whatever I say and you're keeping your ignorance up because you're too stupid or too afraid to see your own cluelessness.
blah-er, you seem to be a little confused (and yeah, you're going to use that comment on me just to have a "come back", it's okay).
We've seen a few others like you on these forums, like Qndre, Quan Chi2 and Donkano.
You, Qndre and Donkano tell people wrong while you don't even have any clue what you're talking about yourself. Qndre found out, eventually, how stupid he is. I guess you will too, when you're 30 or so.
|
|
Back to top |
|
 |
newb Turds are yummy

Age:33 Gender: Joined: Mar 15 2005 Posts: 1267 Location: England Offline
|
Posted: Sun Nov 13, 2005 9:40 am Post maybe stupid Post subject: |
 |
|
|
|
Quan Chi2 is actually okay now on these forums. He actually asks things with maturity and respect. _________________ Haha SpecShip
|
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sun Nov 13, 2005 11:53 am Post maybe stupid Post subject: |
 |
|
|
|
blah-er wrote: | But was taking the forever loop finction (for (; ; ); ) into considerations but that didn't seem that right. |
Those forever loops definitely do help make my program look like they're doing something!
And no, I'd say Quan Chi is still an idiot. Getting better though, I guess. _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
|
|
Back to top |
|
 |
(Deactived B l a h e r) BiLinux User I can take it both ways
Age:34 Gender: Joined: Mar 25 2005 Posts: 341 Location: East Sparta, Ohio Offline
|
Posted: Sun Nov 13, 2005 6:21 pm Post maybe stupid Post subject: |
 |
|
|
|
Solo here's a example of my code
{
if nFORUMS = 1;
//1 equals yes, o equals no
{
CreateDirectory("C:\\"stzDOMAIN"\\Forums");
CopyFile("C:\\BlaherTech.com\\Hosting\\Forums\\Filenames.file","C:\\"stzDOMAIN"\\Forums",FALSE);
//All the files and directorys will be in this form
}
My web page if you click yes if you would like forums. On submit it will make "nFORUMS" equal 1. If no it will equal 0. The variables will be sent to the script of my chooseing (This one I'm making of course) and they will be proccessed and the customers web Domain will be made and have the files in it that they indicate. BTW "stzDOMAIN" is the name of the Domain name they want (ex. http://www.BobsSite.com).
And Solo NEVER EVER CALL ME STUPID AGAIN!!! I'm taking Pre. calc as a freshmen in highschool. I'm almost in every advanced class that is avilable at our school. Yes I do agree I'm stubbern and Dumb in certain area's (Mostly English) but I'm just having a hard time with programing because I'm just starting out and I'm skipping from one thing to the other.
|
|
Back to top |
|
 |
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.

Age:37 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Sun Nov 13, 2005 6:40 pm Post maybe stupid Post subject: |
 |
|
|
|
Uhh shouldn't that be...
or...
INSTEAD OF
Oh well, that must be me.
Anyway, you're leaving, so... I guess it doesn't matter.
Enjoy the rest of your life as the moron you are, have a nice day.
|
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sun Nov 13, 2005 9:29 pm Post maybe stupid Post subject: |
 |
|
|
|
==
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sun Nov 13, 2005 9:30 pm Post maybe stupid Post subject: |
 |
|
|
|
Or just
if (cyan_fire.admin) ...
|
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sun Nov 13, 2005 10:49 pm Post maybe stupid Post subject: |
 |
|
|
|
Ahh, but a single equals can be quite useful.
|
|
Back to top |
|
 |
Muskrat Server Help Squatter

Age:38 Joined: Aug 24 2004 Posts: 829 Location: Swamp Offline
|
Posted: Mon Nov 14, 2005 1:15 am Post maybe stupid Post subject: |
 |
|
|
|
Indeed, I prefer Cyan's original version.
|
|
Back to top |
|
 |
Cerium Server Help Squatter

Age:42 Gender: Joined: Mar 05 2005 Posts: 807 Location: I will stab you. Offline
|
Posted: Mon Nov 14, 2005 1:02 pm Post maybe stupid Post subject: |
 |
|
|
|
Indeed, so long as my name stays out of the next statement. _________________ There are 7 user(s) ignoring me right now.
|
|
Back to top |
|
 |
|