Skip to content

Commit e67ba53

Browse files
author
Saveen Reddy
authored
Create Create_One_Million_Files.ps1
1 parent b62975c commit e67ba53

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Set-StrictMode -Version 2
2+
$ErrorActionPreference = "Stop"
3+
4+
# Login-AzureRmAccount -SubscriptionName <YOURSUBSCRIPTION>
5+
$account = "YOURADLSACCOUNT"
6+
7+
# This script will create three levels of folders each hass a hundred subfolders
8+
$level1 = 1..100
9+
$level2 = 1..100
10+
$level3 = 1..100
11+
12+
# Keep a count of the files
13+
$count = 1
14+
15+
foreach ($a in $level1)
16+
{
17+
foreach ($b in $level2)
18+
{
19+
foreach ($c in $level3)
20+
{
21+
$remote_path = "/ManyFiles/" + $a + "/" + $b + "/" + $c + "/" + "data_" + $count + ".csv"
22+
23+
Write-Host $count, $remote_path
24+
25+
$value = $a.ToString() + "," + $b.ToString() + "," + $c.ToString() + "," + $count.ToString()
26+
New-AdlStoreItem -Account $account -Path $remote_path -Force -Value $value
27+
28+
$count++
29+
}
30+
}
31+
}

0 commit comments

Comments
 (0)