CodePudding user response:
String GetCurrentDirectory () : in the current directoryBoolean DirectoryExists (string directoryname) : to determine whether a directory there
Integer ChangeDirectory (string directoryname) : to change the current directory
Integer CreateDirectory (string directoryname) : to establish a new directory
Integer RemoveDirectory (string directoryname) : remove directory
Integer FileCopy (string, sourcefile string targetfile {Boolean replace}) : file copy
Integer FileMove (string, sourcefile string targetfile) : move files
CodePudding user response:
Make a batch file, or by pb to performCodePudding user response:
Write a batchRun in pb calls, the most simple,
CodePudding user response:
//copies ls_DirStart all files in the directory to ls_DirEnd directory:
The integer li_FileNum
String ls_Str ls_File_Bat, ls_DirStart, ls_DirEnd
Ls_File_Bat='aa. BAT'
Ls_DirStart='C: \' bb '
Ls_DirEnd='D: \' bb '
IF NOT DirectoryExists (ls_DirStart) THEN
MessageBox (' prompt ', ls_DirStart + 'directory does not exist,')
RETURN
END the IF
FileDelete (ls_File_Bat)
Ls_Str='@ echo off ~ r ~ n + & amp;
'the md + ls_DirEnd +' ~ r ~ n + & amp;
'del' + ls_DirEnd + '\ *. */q ~ r ~ n' + & amp;
'xcopy' + ls_DirStart + '\ *. *' + ls_DirEnd + '/E'
Li_FileNum=FileOpen (ls_File_Bat, & amp;
LineMode! The Write! , LockWrite! , Append!)
FileWrite (li_FileNum ls_Str)
FileClose (li_FileNum)
The Run (ls_File_Bat)
CodePudding user response:
Change:
Ls_Str='@ echo off ~ r ~ n + & amp;
'del' + ls_DirEnd + '\ *. */s/f/q ~ r ~ n' + & amp;
'xcopy' + ls_DirStart + '\ *. *' + ls_DirEnd + '\ *. */E'
Delete all files under the ls_DirEnd, including a folder under the all files,
Ensure that the process of copying not cover tip,
CodePudding user response:
1/f, positive solutionsCodePudding user response:
Have the filecopy PB11 directlyCodePudding user response:
If the folder nested folders, not like that.CodePudding user response:
The run (" xcopy source directory target directory ")CodePudding user response: