|
Post by milfredo on Jun 9, 2018 13:56:18 GMT -5
Hi,
I'm looking for some code that would allow me to either move data files from one folder to another by either copying the file and pasting it in a different folder. Or just moving the file from one folder to another.
Any help would be appreciated.
Milfredo
|
|
|
Post by tsh73 on Jun 9, 2018 14:23:55 GMT -5
'Moving file: 'NAME oldName$ as newName$
oldName$="C:\wrk\test tst\1.txt" 'file must exist newName$="C:\var\1.txt" 'path must exist 'newName$="C:\var\2.txt" 'you can change name NAME oldName$ as newName$
|
|
kevin
New Member
Posts: 13
|
Post by kevin on Aug 14, 2018 8:41:19 GMT -5
[BackUp] confirm "would you Like to do a backup"; answer$ if answer$ = "no" then [Delwait]
result = Mkdir("BACKUPS")
filedialog "Select file", "*.*", currentfilename$ filedialog "SAVE AS", "*.txt", copyfilename$ 'KEVIE.TXT" 'let currentfilename$= "notes\New-diary.TXT" 'let copyfilename$= "BACKUPS\New-diary.txt" let bFailIfExists= 1 calldll #kernel32, "CopyFileA",_ currentfilename$ as ptr,_ copyfilename$ as ptr,_ bFailIfExists as long,_ '1 or 0 re as long if re=0 then print "copyfailed"
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ let currentfilename$= "notes\New-diary.TXT" let copyfilename$= "BACKUPS\New-diary.txt" let bFailIfExists= 1 calldll #kernel32, "CopyFileA",_ currentfilename$ as ptr,_ copyfilename$ as ptr,_ bFailIfExists as long,_ '1 or 0 re as long if re=0 then print "copyfailed"
|
|