7bool HDD_Move(
const char *FileName,
const char *FromDir,
const char *ToDir)
19 if(FileName && *FileName && FromDir && ToDir)
22 strcat(OldPath, FileName);
26 strcat(NewPath, FileName);
29 if(rename(OldPath, NewPath) != 0)
36 if(isRec && strcmp(Ext,
".nav"))
40 TAP_SPrint(OldInfName,
"%s%s-%d%s.inf%s", Path, Name, fNumber, Ext, isDel ?
".del" :
"");
42 TAP_SPrint(OldInfName,
"%s%s%s.inf%s", Path, Name, Ext, isDel ?
".del" :
"");
46 TAP_SPrint(NewInfName,
"%s%s-%d%s.inf%s", Path, Name, fNumber, Ext, isDel ?
".del" :
"");
48 TAP_SPrint(NewInfName,
"%s%s%s.inf%s", Path, Name, Ext, isDel ?
".del" :
"");
50 rename(OldInfName, NewInfName);
55 TAP_SPrint(OldInfName,
"%s%s-%d%s.nav%s", Path, Name, fNumber, Ext, isDel ?
".del" :
"");
57 TAP_SPrint(OldInfName,
"%s%s%s.nav%s", Path, Name, Ext, isDel ?
".del" :
"");
61 TAP_SPrint(NewInfName,
"%s%s-%d%s.nav%s", Path, Name, fNumber, Ext, isDel ?
".del" :
"");
63 TAP_SPrint(NewInfName,
"%s%s%s.nav%s", Path, Name, Ext, isDel ?
".del" :
"");
65 rename(OldInfName, NewInfName);
70 TAP_SPrint(OldInfName,
"%s%s-%d.cut%s", Path, Name, fNumber, isDel ?
".del" :
"");
72 TAP_SPrint(OldInfName,
"%s%s.cut%s", Path, Name, isDel ?
".del" :
"");
76 TAP_SPrint(NewInfName,
"%s%s-%d.cut%s", Path, Name, fNumber, isDel ?
".del" :
"");
78 TAP_SPrint(NewInfName,
"%s%s.cut%s", Path, Name, isDel ?
".del" :
"");
80 rename(OldInfName, NewInfName);
85 TAP_SPrint(OldInfName,
"%s%s-%d.cut.bak%s", Path, Name, fNumber, isDel ?
".del" :
"");
87 TAP_SPrint(OldInfName,
"%s%s.cut.bak%s", Path, Name, isDel ?
".del" :
"");
91 TAP_SPrint(NewInfName,
"%s%s-%d.cut.bak%s", Path, Name, fNumber, isDel ?
".del" :
"");
93 TAP_SPrint(NewInfName,
"%s%s.cut.bak%s", Path, Name, isDel ?
".del" :
"");
95 rename(OldInfName, NewInfName);
100 TAP_SPrint(OldInfName,
"%s%s-%d.srt%s", Path, Name, fNumber, isDel ?
".del" :
"");
102 TAP_SPrint(OldInfName,
"%s%s.srt%s", Path, Name, isDel ?
".del" :
"");
106 TAP_SPrint(NewInfName,
"%s%s-%d.srt%s", Path, Name, fNumber, isDel ?
".del" :
"");
108 TAP_SPrint(NewInfName,
"%s%s.srt%s", Path, Name, isDel ?
".del" :
"");
110 rename(OldInfName, NewInfName);
void ConvertPathType(const char *Source, char *Dest, tPathFormat DestFormat)
bool HDD_Exist(const char *FileName)
bool HDD_Move(const char *FileName, const char *FromDir, const char *ToDir)
void MakeUniqueFileName(char *FileName)
void SeparateFileNameComponents(const char *FileName, char *Path, char *Name, char *Ext, int *Index, bool *isRec, bool *isDel)
#define TS_FILE_NAME_SIZE