Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Copying Directory's in C/C++ or atleast Java-Script
Goto page 1, 2  Next
 
Post new topic   Reply to topic Printable version
 View previous topic  External vs Internal Hard Drive Post :: Post forum problem <_These  View next topic  
Author Message
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sat Nov 12, 2005 7:54 pm   Post maybe stupid    Post subject: Copying Directory's in C/C++ or atleast Java-Script Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Sat Nov 12, 2005 8:04 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sat Nov 12, 2005 8:14 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email
Quan Chi2
Member of "Sexy Teenagers that Code" Group
Member of


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 860
Location: NYC
Offline

PostPosted: Sat Nov 12, 2005 8:18 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Sat Nov 12, 2005 8:36 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

This is not copy as in copy-paste. The CopyFile() function takes a FROM and a TO.
Back to top
View users profile Send private message Add User to Ignore List
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Sat Nov 12, 2005 8:56 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Ehh, Ekted, do you even have any idea what this kid is trying to do?
Back to top
View users profile Send private message Add User to Ignore List
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sat Nov 12, 2005 9:06 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Sat Nov 12, 2005 11:55 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sun Nov 13, 2005 7:53 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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.
Back to top
View users profile Send private message Add User to Ignore List Send email
Quan Chi2
Member of "Sexy Teenagers that Code" Group
Member of


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 860
Location: NYC
Offline

PostPosted: Sun Nov 13, 2005 8:07 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

http://cprogramming.com/ <--teaches you about functions.

You can also try to get the pdf file for C programming for Dummies.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sun Nov 13, 2005 8:14 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email
Default
Server Help Squatter


Age:44
Gender:Gender:Female
Joined: Aug 25 2005
Posts: 286
Offline

PostPosted: Sun Nov 13, 2005 8:16 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

This may help you: http://www.scripts.com/c-and-cplusplus-scripts/
Back to top
View users profile Send private message Add User to Ignore List MSN Messenger
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Sun Nov 13, 2005 8:27 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sun Nov 13, 2005 8:57 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Sun Nov 13, 2005 9:33 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
newb
Turds are yummy
Turds are yummy


Age:33
Gender:Gender:Male
Joined: Mar 15 2005
Posts: 1267
Location: England
Offline

PostPosted: Sun Nov 13, 2005 9:40 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Quan Chi2 is actually okay now on these forums. He actually asks things with maturity and respect.
_________________
Haha SpecShip
Back to top
View users profile Send private message Add User to Ignore List Send email MSN Messenger
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sun Nov 13, 2005 11:53 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website
(Deactived B l a h e r)
BiLinux User
I can take it both ways


Age:34
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 341
Location: East Sparta, Ohio
Offline

PostPosted: Sun Nov 13, 2005 6:21 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Sun Nov 13, 2005 6:40 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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.
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sun Nov 13, 2005 9:05 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Code: Show/Hide
if (cyan_fire.admin = true)
{
   ban(blah-er);
}
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Sun Nov 13, 2005 9:29 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

==
Back to top
View users profile Send private message Add User to Ignore List
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Sun Nov 13, 2005 9:30 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Or just

if (cyan_fire.admin) ...
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sun Nov 13, 2005 10:49 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Ahh, but a single equals can be quite useful.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Muskrat
Server Help Squatter


Age:38
Joined: Aug 24 2004
Posts: 829
Location: Swamp
Offline

PostPosted: Mon Nov 14, 2005 1:15 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Indeed, I prefer Cyan's original version.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cerium
Server Help Squatter


Age:42
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Mon Nov 14, 2005 1:02 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Indeed, so long as my name stays out of the next statement.
_________________
There are 7 user(s) ignoring me right now.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 170 page(s) served in previous 5 minutes.

phpBB Created this page in 0.682335 seconds : 52 queries executed (74.8%): GZIP compression disabled