Server Help

Trash Talk - Copying Directory's in C/C++ or atleast Java-Script

(Deactived B l a h e r) - Sat Nov 12, 2005 7:54 pm
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.
Mr Ekted - Sat Nov 12, 2005 8:04 pm
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()
(Deactived B l a h e r) - Sat Nov 12, 2005 8:14 pm
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)?)
Quan Chi2 - Sat Nov 12, 2005 8:18 pm
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.
Mr Ekted - Sat Nov 12, 2005 8:36 pm
Post subject:
This is not copy as in copy-paste. The CopyFile() function takes a FROM and a TO.
Solo Ace - Sat Nov 12, 2005 8:56 pm
Post subject:
Ehh, Ekted, do you even have any idea what this kid is trying to do?
(Deactived B l a h e r) - Sat Nov 12, 2005 9:06 pm
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)
Mr Ekted - Sat Nov 12, 2005 11:55 pm
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);
(Deactived B l a h e r) - Sun Nov 13, 2005 7:53 am
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. icon_confused.gif 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.
Quan Chi2 - Sun Nov 13, 2005 8:07 am
Post subject:
http://cprogramming.com/ <--teaches you about functions.

You can also try to get the pdf file for C programming for Dummies.
(Deactived B l a h e r) - Sun Nov 13, 2005 8:14 am
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*
Default - Sun Nov 13, 2005 8:16 am
Post subject:
This may help you: http://www.scripts.com/c-and-cplusplus-scripts/
Solo Ace - Sun Nov 13, 2005 8:27 am
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.
(Deactived B l a h e r) - Sun Nov 13, 2005 8:57 am
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.
Solo Ace - Sun Nov 13, 2005 9:33 am
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.
newb - Sun Nov 13, 2005 9:40 am
Post subject:
Quan Chi2 is actually okay now on these forums. He actually asks things with maturity and respect.
Cyan~Fire - Sun Nov 13, 2005 11:53 am
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.
(Deactived B l a h e r) - Sun Nov 13, 2005 6:21 pm
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.
Solo Ace - Sun Nov 13, 2005 6:40 pm
Post subject:
Uhh shouldn't that be...

Code: Show/Hide
if (nFORUMS == 1)


or...

Code: Show/Hide
if (nFORUMS)


INSTEAD OF

Code: Show/Hide
if nFORUMS = 1;


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.
Cyan~Fire - Sun Nov 13, 2005 9:05 pm
Post subject:
Code: Show/Hide
if (cyan_fire.admin = true)
{
   ban(blah-er);
}

Mr Ekted - Sun Nov 13, 2005 9:29 pm
Post subject:
==
Mr Ekted - Sun Nov 13, 2005 9:30 pm
Post subject:
Or just

if (cyan_fire.admin) ...
Cyan~Fire - Sun Nov 13, 2005 10:49 pm
Post subject:
Ahh, but a single equals can be quite useful.
Muskrat - Mon Nov 14, 2005 1:15 am
Post subject:
Indeed, I prefer Cyan's original version.
Cerium - Mon Nov 14, 2005 1:02 pm
Post subject:
Indeed, so long as my name stays out of the next statement.
D1st0rt - Mon Nov 14, 2005 1:57 pm
Post subject:
$(My_witty_nerd_statement_of_response)

you all and your hardcoded posts

Muskrat, is that a shrinkwrapped cat in your avatar?
Muskrat - Mon Nov 14, 2005 8:20 pm
Post subject:
Yup, and the cat enjoyed it.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group