I have to agree with stranac. This is quite a ridiculous program to go through the hassle of building an exe for. Unless your are just trying to understand the process of how to do it.
For one you did not mention which program you were using to create your exe file. cx_freeze or py2exe, because both require different modification of the setup file. Second of all, you did not inlcude your setup file. This is information you should always share when asking about building an exe with python.
- Code: Select all
cmd = 'deleteFolders.cmd'
I am not sure what you mean, as that is not a valid command to any operating system.
So my next question is if how to include the file deleteFolders.cmd into the package and also the package "os" that I import in my .py file?
assuming that deleteFolders.cmd is a file based on your statement here, and that it doesnt contain the full path, you would have to move this file within the location of the exe. If your source code is looking for it within the same directory then your exe is also looking for it within its same directory. That varies with your modification of your setup file.
Unless you explicitly exclude the os module in your setup file, all of python standard libraries should be packaged within the exe or within its directory in a zip depending on your setup file.
So then we go in circles because you did not supply us with enough information. Please read this