Jump to content

ACF


vtuls
 Share

Recommended Posts

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.

; 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.au3

acf.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

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 :lmao:

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...