{"id":607,"date":"2020-08-13T00:15:14","date_gmt":"2020-08-13T07:15:14","guid":{"rendered":"http:\/\/gantovnik.com\/bio-tips\/?p=607"},"modified":"2020-08-13T00:15:14","modified_gmt":"2020-08-13T07:15:14","slug":"90-iterating-through-groups-of-files","status":"publish","type":"post","link":"https:\/\/gantovnik.com\/bio-tips\/2020\/08\/90-iterating-through-groups-of-files\/","title":{"rendered":"#90 Iterating through groups of files"},"content":{"rendered":"<p>#90 Iterating through groups of files<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\nREM Iterating through groups of files\nfor %%B in (D:\\projects\\bat\\test\\*.txt) do (echo %%B)\npause\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#90 Iterating through groups of files REM Iterating through groups of files for %%B in (D:\\projects\\bat\\test\\*.txt) do (echo %%B) pause<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_lmt_disableupdate":"yes","_lmt_disable":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[17],"tags":[],"class_list":["post-607","post","type-post","status-publish","format-standard","hentry","category-batch"],"modified_by":null,"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8bH0k-9N","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":609,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/08\/91-iterating-through-directories-and-files-inside-these-directories\/","url_meta":{"origin":607,"position":0},"title":"#91 Iterating through directories and files inside these directories","author":"gantovnik","date":"2020-08-13","format":false,"excerpt":"#91 Iterating through directories and files inside these directories [code language=\"python\"] set myDir=\"D:\\lib\" for \/d %%B in (%myDir%\\*) do ( @for %%C in (\"%%B\\*.dat\") do echo %%C) pause [\/code]","rel":"","context":"In &quot;batch&quot;","block_context":{"text":"batch","link":"https:\/\/gantovnik.com\/bio-tips\/category\/batch\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1603,"url":"https:\/\/gantovnik.com\/bio-tips\/2022\/10\/210-parametric-curve-in-3d-2-2-2-2-2-2-2-2-2-2-2-2-2-3-3-2-2-3-2-2-4-2-2\/","url_meta":{"origin":607,"position":1},"title":"#307 Categorize support issues using multiclass classification with ML.NET using C#","author":"gantovnik","date":"2022-10-28","format":false,"excerpt":"Data file: Download the and place to Data folder two files: issues_train.tsv and the issues_test.tsv GitHubIssueData.cs [code language=\"csharp\"] \/\/ <SnippetAddUsings> using Microsoft.ML.Data; \/\/ <\/SnippetAddUsings> namespace GitHubIssueClassification { \/\/ <SnippetDeclareTypes> public class GitHubIssue { [LoadColumn(0)] public string ID { get; set; } [LoadColumn(1)] public string Area { get; set; } [LoadColumn(2)]\u2026","rel":"","context":"In &quot;C#&quot;","block_context":{"text":"C#","link":"https:\/\/gantovnik.com\/bio-tips\/category\/c\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1969,"url":"https:\/\/gantovnik.com\/bio-tips\/2023\/09\/393-count-the-number-of-files-with-a-specific-extension-in-a-folder-using-batch-script\/","url_meta":{"origin":607,"position":2},"title":"#393 Count the number of files with a specific extension in a folder using batch script","author":"gantovnik","date":"2023-09-23","format":false,"excerpt":"[code language=\"python\"] @echo off set count=0 for \/f \"delims=\" %%i in ('dir \/s \/b *.fem') do ( set \/a \"count=count+1\" ) echo Number of fem files in the folder = %count% pause exit 0 [\/code] Output: [code language=\"python\"] Number of fem files in the folder = 20 Press any key\u2026","rel":"","context":"In &quot;batch&quot;","block_context":{"text":"batch","link":"https:\/\/gantovnik.com\/bio-tips\/category\/batch\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":867,"url":"https:\/\/gantovnik.com\/bio-tips\/2021\/02\/156-filtering-content-from-files-using-awk\/","url_meta":{"origin":607,"position":3},"title":"#156 Filtering content from files using awk","author":"gantovnik","date":"2021-02-09","format":false,"excerpt":"#156 Displaying and filtering the content of files with awk Using the following command, we can print all lines from the file: [code language=\"python\"] awk ' { print } ' \/etc\/passwd [\/code] This is equivalent to using the $0 variable. The $0 variables refers to the complete line. [code language=\"python\"]\u2026","rel":"","context":"In &quot;awk&quot;","block_context":{"text":"awk","link":"https:\/\/gantovnik.com\/bio-tips\/category\/awk\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1400,"url":"https:\/\/gantovnik.com\/bio-tips\/2022\/02\/210-parametric-curve-in-3d-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2\/","url_meta":{"origin":607,"position":4},"title":"#267 tk_getOpenFile in tcl\/tk","author":"gantovnik","date":"2022-02-10","format":false,"excerpt":"#267 tk_getOpenFile in tcl\/tk. [code language=\"python\"] set types { {\"All Source Files\" {.tcl} } {\"Image Files\" {.txt} } {\"All files\" *} } proc doIt {label} { global types set file [tk_getOpenFile -filetypes $types -parent .] $label configure -text $file } label .l -text \"No File\" button .b -text \"Select a\u2026","rel":"","context":"In &quot;tcl&quot;","block_context":{"text":"tcl","link":"https:\/\/gantovnik.com\/bio-tips\/category\/tcl\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2022\/02\/ex267.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":831,"url":"https:\/\/gantovnik.com\/bio-tips\/2021\/01\/146-how-to-access-linux-ubuntu-files-from-windows-10-wsl\/","url_meta":{"origin":607,"position":5},"title":"#146 How to access Linux\/Ubuntu files from Windows 10 WSL?","author":"gantovnik","date":"2021-01-14","format":false,"excerpt":"#146 How to access Linux\/Ubuntu files from Windows 10 WSL? [code language=\"python\"] \\\\wsl$\\Ubuntu\\home\\user\\whatever [\/code]","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/gantovnik.com\/bio-tips\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/607","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/comments?post=607"}],"version-history":[{"count":0,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/607\/revisions"}],"wp:attachment":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/media?parent=607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/categories?post=607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/tags?post=607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}