vtuls Posted January 24, 2009 Share Posted January 24, 2009 hello guy's im busy writing a programm that will copy my foto's from a memory stick, SD card or other data card for camera's now that i'm done with writing i would like some opinions from you guys. expandcollapse popup; auto coppy ; a script that auto runs and coppy's my foto's ; from my memory stick or sd card to the dir i entered ; specificly per computer. $dir = @ScriptDir & "\" $pcname = @ComputerName $source = "?" $destination = "?" if FileExists($dir & "settings.ini") = 0 then call("user_create") Else call("user_read") EndIf ;traytip( "pc name","pc name is: " & $pcname, 29) ;sleep(5000) if DirGetSize($dir & $source) = -1 Then MsgBox(0,"File error", "there are no foto's on this device",50) Else FileCopy($dir & $source &"\*.jpg", $destination) dircreate($destination & "\org\") Filemove($dir & $source &"\*.jpg", $destination & "\org\") MsgBox(0,"done", "foto's are coppied",50) EndIf func user_create() $destination = inputbox("path to copy to", "please enter path to copy the foto's to") IniWrite($dir & "settings.ini", $pcname, "Path->", $destination) $source = InputBox("source folder", "please enter the source folder from wich to copy the foto's","?") IniWrite($dir & "settings.ini", $pcname, "Path<-", $dir&$source) EndFunc func user_read() $destination = IniRead($dir & "settings.ini", $pcname, "Path->", "?") $source = IniRead($dir & "settings.ini", $pcname, "Path<-", "?") if $destination = "?" Then call("user_create") EndFunc ; check if file exists ; compare computernames for settings ; when name doesn't come thru there is also an autorun file i couldn't upload so you'll have to write that yourselves.acf.au3acf.exe a badly written code is better than a unwritten onea good written code is even better.but there is always room for improvement. :) Link to comment Share on other sites More sharing options...
gseller Posted January 25, 2009 Share Posted January 25, 2009 This is pretty neat. I haven't fully tested it yet but I like the concept. I was working on something like this a few weeks ago and abandoned the idea. Nice script... Link to comment Share on other sites More sharing options...
vtuls Posted January 26, 2009 Author Share Posted January 26, 2009 thnks for the compliment it means a lot to me hope you guys like it and if you have any additions or remarks that would make this programm or my programming even better i would like to hear it a badly written code is better than a unwritten onea good written code is even better.but there is always room for improvement. :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now