SmartGPU2-LCD480X320Touch-CommandSet

SMART GPU 2 3.5” TOUCH
Command Set
Vizic Technologies ©2014 112
2.9.15 Dir/File Rename/Move 4Dhex ‘M’ ascii
Commands (host)
2 bytes + Dir/File OLD name with “.ext” +
1byte(NULL) + Dir/File NEW name with “.ext” +
1byte(NULL).
1.- 0x46 (hex), F (ascii). *FAT command.
2.- 0x4D (hex), M (ascii). (Rename/Move Dir/File)
3 up to N (OLD Dir/File name including extension).
N+1.- 0x00 (hex) NULL ascii(end of OLD name).
N+2 up to M (NEW Dir/File name including extension).
M+1.- 0x00 (hex) NULL ascii(end of NEW name).
Responses (device)
1 byte File ACK + 1 byte Command ACK
1.- 0xXX (hex) - Refer to “File ACK List”.
2.- 0x4F (hex), O (ascii) success ACK.
0x46 (hex), F (ascii) fail NAK.
Description
This Command can rename or move a Directory or
File, both operations can also be achieved in the
same command call.
If Directory or File to rename/move doesn’t exist
during a Dir/File Rename/Move command, this will
fail with NO FILE.
Example (sent commands)
Rename Examples:
Example 1:
<46,4D,31,32,33,2E,74,78,74,00,34,35,36,2E,74,78,
74,00> Rename a File named “123.txt” to 456.txt”,
under the current directory path.
Example 2:
<46,4D,30,3A,2F,31,32,33,2E,74,78,74,00,30,3A,2F,
34,35,36,2E,74,78,74,00> Rename a File named
“123.txt” to “456.txt” under the root “0:/” path.
Move Examples:
Example 1:
<46,4D,30,3A,2F,46,6F,6C,64,65,72,31,2F,46,6F,6C,
64,65,72,32,2F,46,6F,6C,64,65,72,33,00,30,3A,2F,46,
6F,6C,64,65,72,33,00> Move a directory from
0:/Folder1/Folder2/Folder3” to “0:/Folder3” path.
Example 2:
<46,4D,30,3A,2F,31,32,33,2E,74,78,74,00,30,3A,2F,
46,6F,6C,64,65,72,2F,31,32,33,2E,74,78,74,00>
Move a File from 0:/123.txt to 0:/Folder/123.txt
path.