Home > database >  Pb combined with database how to batch change the file name
Pb combined with database how to batch change the file name

Time:09-23

Database of each file filename, one is the current file name, is a new file name, how to change a folder all the files to the new file name?

CodePudding user response:

PB to generate a batch file, and then call execute the batch file should be able to realize

CodePudding user response:

FileExists (fileName) to determine whether file exists in
FileOpen (filename, TextMode! The write! The replace! Open the file
FileWrite (li_file) write files
FileClose () to close the file

CodePudding user response:

refer to the second floor sky_4k_ppm response:
fileExists (fileName) to determine whether file exists in
FileOpen (filename, TextMode! The write! The replace! Open the file
FileWrite (li_file) write files
FileClose () to close the file


Don't understand why want to open the file I have to do is only change the file name

CodePudding user response:

The integer li_FileNum

If FileExists (" existing file ") then

Li_FileNum=FileCopy (" c: \ existing filename. TXT ", & amp;

"D: \ new filename. TXT", FALSE)

Filedelete (" existing file name ")

CodePudding user response:

Use DirList traverse the file
  • Related