tags:

views:

136

answers:

6

Hey i am hoping to write a program where the program automatically just copy pastes all my dad's documents from D:\office folder. So whenever I plug-in my pen-drive , the program silently copies all documents inside my pen-drive. Also all files should be pasted to a hidden folder in the pen-drive (so it remains private) . Synchronization capability also required ...So which language should be easy and where to get started ...any idea ??.

A: 

I hate to be the person who suggests this (I don't like .NET that much):

Make a C# (or VB if you must) Console app, or Forms app (if you want to get fancy). The .NET framework will make this kind of program VERY easy and it might be fun. Unless you want to increase your proficiency in C/C++, i would suggest NOT doing it in those languages since there is a learning curve and it is a little complex to do some simple things.

Bob Fincheimer
so according to yo which language would be better
subanki
C# .NET, If you really want to program it yourself.
Bob Fincheimer
+1  A: 

Why use the clipboard when you could just use shell commands???

Maybe write an autostart batch file on your pen drive that copies files to/from your flash drive as needed.

sheepsimulator
auto-start batch file is out of the question since i format my pen-drive multiple times
subanki
Do you need to auto-detect the drive, or can you simply run a batch file?
sheepsimulator
A: 

"Just paste" or "synchronize"?

For synchronization, unison is a good bet, see http://en.wikipedia.org/wiki/Unison_(file_synchronizer). For "just paste", you could code a call to a batch calling XCOPY from with the Windows Autoplay mechanism.

Sounds like a secret covert operation you're talking about, though...

TheBlastOne
lol no , its just that i want to copy the files to my pen-drive even when my friends or other non wanted people are around me , so hence it should be silent, besides i am not the one who is going to use it , its my dad :)
subanki
A: 

I infer you are on Windows. Window has a plethora of functions to manipulate files. A few functions are below.

  • CopyFile Copies an existing file to a new file.
  • FindFirstFile Searches a directory for a file or subdirectory name that matches a specified name.
  • FindFirstFileEx Searches a directory for a file or subdirectory name and attributes that match those that are specified.
  • FindNextFile Continues a file search.
  • MoveFile Moves an existing file or directory and its children.

On and on. These and many more functions are documented here.

File Management Functions

Copy or move the files to the pen drive.

HTH

JustBoo
wow!! tough English for me ....u made me get my Dictionary... infer = guess, plethora = lot of (large amount)...thanks i learned something new :). By the way which programming language are you talking , is it Windows API ??
subanki
@JustBoo I am not teaing or making fun of you , but what is Anthropomorphic Personification??
subanki
Yes, Windows API... http://tvtropes.org/pmwiki/pmwiki.php/Main/AnthropomorphicPersonification
JustBoo
Wow people please visit the above site link given by JustBoo, very inspiring and spiritual/religious site. I Bookmarked it !!
subanki
@subanki. I think it's OK to make fun of "anthromorphic personification". I think it's probably expected.
MarkJ
@MarkJ But i am not making Fun of it... :(
subanki
"Anthropomorphic Personification" means presenting some abstract concept as a human being (in one form or another). Typical example is representing Death as a hooded skeleton with a scythe.
Thorbjørn Ravn Andersen
BOO! And BOO! again.
JustBoo
@JustBoo I just happen to notice that your English is better than mine. If you know any site that teaches good English then please let me know, I would love to use a higher level of English.
subanki
@subanki - Your English is quite good, IMHO. Probably the best way to improve is to just read a lot of things in various dialects - American English, British English, South African English, etc. Note: I don't know if I'd describe tvtropes as inspiring or religious. It does illustrate a lot of concepts, ideas with television situations.
sheepsimulator
@sheepsimulator Thanks for the opinion , now I have to buy a bunch of Books. Sad reading is tough job, I guess there is no easy way out. I hope Story Books improves some English too
subanki
@subanki - Actually, I meant you should read webpages. Like tvtropes, or whatever is fun your you. You'll probably learn more that way. If it isn't fun, you won't learn anything. I'm not going to post anymore comments, cuz its completely off-topic.
sheepsimulator
A: 

I think that you will need to do a lot of work to get a less than satisfactory result.

I would suggestion you instead have a look at DropBox, which is free up to 2Gb of storage which automatically synchronizes between all registered computers, plus has a special folder which allows for web access. Very nice.

Thorbjørn Ravn Andersen
Thanks for the opinion but i don't prefer something that is online , besides my dad's documents deserves little privacy since some of them might be office documents.
subanki
Ok, show us the code you have...
Thorbjørn Ravn Andersen
I haven't started coding since I am still not sure which language to use and I don't know Windows API , So the time being i am trying to understand what Windows API is all about
subanki
Then I would suggest a less ambitious project to warm up on.
Thorbjørn Ravn Andersen
+3  A: 

Seems to me that some spyin' is about to be goin' on here. :P

I'd recommend C++. Not extremely easy as .Net's tillyvally but fast, framework independent, convenient to manipulate Windows API. You wanna do advanced stealth app, you can't pick the easy way.

AOI Karasu
lol please don't make me look like a criminal trying to make/develop some malicious code. I assure its for our personal use only and no harm to anyone. So cheer up :D
subanki
Just kiddin', mate. :) Yet still serious on using C++. Cheers.
AOI Karasu