5 ms·
Python scripts can also be compiled to an exe file, although I think that the following batch one-liner is the best for this job: for /r startdir %%i in (*.c
by mistaken 10y ago
Python scripts can also be compiled to an exe file, although I think that the following batch one-liner is the best for this job:
for /r startdir %%i in (*.cha) do ECHO ren "%%i" "%%~ni.txt"
- Annatar 10y agoYep, one liner crushes the problem because a shell script is the perfect tool for the job!
- chriskrycho 10y agoFor the record, as the author of the linked post… this is exactly what one "should" do for convenience in this situation. Compiling Python to exe from Mac to run on Windows is actually a lot of work, though it's doable (I've done it more than once in the past).
- rat87 10y agoThats pretty ugly ls -Recurse -Include *.cha | % {mv $_.FullName $_. FullName.Replace(".cha", ".txt")}