Using wildcards for CopyFile and DeleFile

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Using wildcards for CopyFile and DeleFile

Post by Marc56us »

(following discussion about using wildcards in Copy/Del :arrow: viewtopic.php?f=13&t=75439)

It might be interesting to add the possibility to use wildcards for the Copy and Delete file commands.
(At least " * " optionnaly ' ? ' but best of all and modern will be "regular expressions")

This should be put as an option in existing commands or as a new feature to ensure backward compatibility and to avoid possible errors due to systems that accept '*' and '?' in filenames.

CopyFile

Code: Select all

CopyFile(SourceFilename$, DestinationFilename$ [, Flags])

#PB_No_Overwrite     	(New)
#PB_Allow_Wildcards 	(New) 
DeleteFile

Code: Select all

DeleteFile(Filename$ [, Flags])

#PB_FileSystem_Force 	(Exist)
#PB_Allow_Wildcards  	(New)
:idea: :?: