Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Delete the files that you want to replace in their respective folder(s).

  2. Copy or move the updated files to the correct folder. You can use scripts to move multiple files to the SD card folder, as shown in the example below.

  3. The main zip file that you download can contain other zip files. So you could unzip the main file, and then do targeted unzips to replace selected files.

Example

To copy everything from an “Update” folder to a “Myapplication” folder, do the following:

Code Block
Copyroot("Update", "Myapplication")

Sub copyroot(path$ as string, Target$ as String)
	mylist = listdir(path$)
	For each item in mylist
		if instr(1, item, ".") > 0 then
			print "found a file: "; item
			print "path: "; path$
			CopyFile(path$+"\"+item, Target$+"\"+item)
		else
			print "found folder: " ;item
			CreateDirectory(Target$+"\"+item)
			copytree("\"+item)
		endif
	next
end Sub

Sub Copytree(path$ as string)
print "copy tree: "; path$
	'e.g. \pool
	mylistb = listdir("\Update"+path$)
	print mylistb



For each item in mylistb
	print len(item)
	if instr(1, item, ".") > 0 then CopyFile("\\Update"+path$+"\\"+item, Target$+path$)
	if len(item) > 1 then
		print "copying sha file: "; Target$+path$+"\\"+item
		showstatus("copying file: "+ Target$+path$+"\\"+item)
		
		CopyFile("\\Update"+path$+"\\"+item, Target$+path$+"\\"+item)	'folders only 1 digit long outside root ?
	else
		print "found sub folder: "; path$+"\\"+item
		CreateDirectory(Target$+path$+"\\"+item)
		copytree(path$+"\\"+item)
	endif
next