Created
October 18, 2023 02:28
-
-
Save ApexExpress/46fef73d94a4057bb1588d5356cfe4a8 to your computer and use it in GitHub Desktop.
File creation via python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
test = "path/goto/TEST.sh*" | |
config = "path/goto/CONFIG.sh*" | |
src = "path/goto/SRC.sh*" | |
path = "path/goto/PATH.sh*" | |
route = "path/goto/ROUTE.sh*" | |
try: | |
with open(test, "w") as test_file, \ | |
open(config, "w") as config_file, \ | |
open(src, "w") as src_file, \ | |
open(path, "w") as path_file, \ | |
open(route, "w") as route_file: | |
print("Files created successfully.") | |
except Exception as e: | |
print(f"Failed to create files: {str(e)}") | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment