|
Answer» Batch file to unblock files copied from internet?i found this: https://stackoverflow.com/questions/15263523/batch-file-to-unblock-files-copied-from-internet
and i use this and reaally works: FOR %a in (*.dll *.exe *.bat *.txt *.md) do (echo.>%a:Zone.Identifier)
The problem is i have a folder: C:\Python with many files and many many diferrent types,i can't search and writte all extensions ) ,is there a command to Unlock ALL files from folder?this is my folder path and name : C:\Pythoncan do *.* covers all names and extensions. "Its going to target everything at that path no matter file name and extension type"
FOR %a in (*.*) do (echo.>%a:Zone.Identifier)yes is exactelly what i want but can u make it run as batch script?
start cmd/ FOR %a in (*.*) do (echo.>%a:Zone.Identifier)
something like this To run as a batch script just need to put that into notepad and then SAVE it as a filename.bat then launch the .bat file
Open notepad
copy this to it start cmd/ FOR %a in (*.*) do (echo.>%a:Zone.Identifier)
and save as MyFirstBatch.bat and launch that and it will run.not working i rceived this error message: windows cannot find 'cmd/'.Make sure you typed the name corectly,and then try again.maybe this: start cmd /k FOR %a in (*.*) do (echo.>%a:Zone.Identifier)Why are you trying to use start cmd at all. You don't need it when running from the cmd prompt nor do you need it running in a batch file.
Also if you read the help for the FOR command you would see this very quickly.
Code: [Select]To use the FOR command in a batch PROGRAM, specify %%variable instead of %variable. Variable names are case sensitive, so %i is different from %I.So your code becomes.
Code: [Select]FOR %%G in (*.*) do (echo.>%%G:Zone.Identifier)yes perfect, thank you!
|