Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can modify the template suffix? #124

Open
wosledon opened this issue Jul 26, 2023 · 12 comments
Open

Can modify the template suffix? #124

wosledon opened this issue Jul 26, 2023 · 12 comments

Comments

@wosledon
Copy link

I mentioned an issue earlier #66 is about the case where the template folder is empty.Now I found the reason.

Since the files with the tmpl suffix resemble temporary files in Windows, they were cleaned up when I used some scripts or software to clean junk files.

I think this could be fixed by modifying the template suffix.

@wosledon wosledon added the bug Something isn't working label Jul 26, 2023
@bard83
Copy link
Collaborator

bard83 commented Jul 26, 2023

It will be also interesting to know when the templates are deleted. Does it happen randomly?

@wosledon
Copy link
Author

Well, when I try to use the tool to clean up junk files of C drive as well as cache files, the files with tmpl suffix are also in the cleanup items.

Like a tool named Dism++ or this script

@echo off
echo cleaing...
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
echo clear!

echo. & pause

@bard83
Copy link
Collaborator

bard83 commented Jul 27, 2023

TBH I'd rather tend to say that you should open a bug on the Dism++ repo. It clearly deletes something which is not a temporary file.

@wosledon
Copy link
Author

I'm guessing that at some point the tmpl suffix might be recognized as a suffix like tmp, or the tmpl suffix would have been in the cleanup list. Because every time I clean up the junk files, the template files are lost.

@bard83
Copy link
Collaborator

bard83 commented Jul 28, 2023

You could make an easy test, just creating a couple of tmpl files in some folder (maybe on the same level of the vs code extension), run Dism++ and check whether they are delete or not.

@wosledon
Copy link
Author

You don't need to use Dism++, the script I wrote above will do it😂😂

@bard83
Copy link
Collaborator

bard83 commented Jul 28, 2023

Like a tool named Dism++ or this script

Well probably you should first clarify which one of them deletes the files... shouldn't you?

@wosledon
Copy link
Author

All, but scripts are a relatively simple way to reproduce.

@bard83
Copy link
Collaborator

bard83 commented Aug 8, 2023

The script you sent, deletes from several places. What I suggest is to isolate the instruction which deletes the template files. I cannot do by my self because I'm under linux.

@bard83 bard83 added feature request and removed bug Something isn't working labels Aug 8, 2023
@wosledon
Copy link
Author

wosledon commented Aug 8, 2023

okey...

@bard83
Copy link
Collaborator

bard83 commented Nov 13, 2023

I wanted to let you know about removing templates. It will happen and probably you won't struggle anymore. Yet is not clear whether it will be part of the 1.10 or 1.11. Stay tuned.

This extension will be now published here

@PoLaKoSz
Copy link
Collaborator

The reason this happens is that Windows has retained compatibility with file names from MS-DOS, where file names were limited to a 3-character extension.

source: https://superuser.com/a/1644933/914033

I would highly recommend rewrite your script in PowerShell and if possible and an exclusion to Dism++ to prevent deleting the extension template files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants