OneDrive Files On-Demand और business apps — placeholder जो assumptions तोड़ते हैं, और उनसे कैसे निपटें

· अद्यतन तिथि: · · OneDrive, Files On-Demand, KFM, Windows, business apps, cloud storage, file system, troubleshooting, IT

संशोधन इतिहास (पहला संस्करण, 20 Aug 2026 को प्रकाशित)
पहला प्रकाशन
इस लेख का हवाला दें(DOI: 10.5281/zenodo.22176338)

यह लेख Zenodo पर संग्रहीत है। नीचे वह DOI है जो हमेशा नवीनतम संस्करण की ओर ले जाता है, और वह DOI भी जो आपके पढ़े जा रहे संस्करण से बँधा है।

Go Komura (2026). OneDrive Files On-Demand और business apps — placeholder जो assumptions तोड़ते हैं, और उनसे कैसे निपटें. KomuraSoft LLC. https://doi.org/10.5281/zenodo.22176338 https://comcomponent.com/hi/blog/onedrive-files-on-demand-business-apps/

DOI (नवीनतम संस्करण)
10.5281/zenodo.22176338
DOI (यह संस्करण)
10.5281/zenodo.22176339

“Business app उस CSV को नहीं पढ़ पाता जो मैंने desktop पर save की।” “पहले चलने वाला import PC बदलने के बाद ‘file not found’ से fail होता है।” “Explorer file दिखाता है, पर app से खोलने पर error आता है।” — पिछले कुछ वर्षों में customers से इस तरह का परामर्श regular हो गया है।

जाँच करने पर वजह अक्सर app bug नहीं बल्कि OneDrive का "Desktop और Documents का automatic backup" (Known Folder Move, KFM) और Files On-Demand होता है। Actual Desktop C:\Users\<name>\OneDrive\Desktop पर चला गया है, और वहाँ दिखने वाली कुछ files बिना local content वाले "placeholder" हैं। User और IT इस बदलाव को बिना notice किए PC इस्तेमाल करते रहते हैं।

यानी, business app की implicit assumption कि "file local disk पर है" बिना किसी के decision के इस assumption से बदल दी गई है कि "file cloud में है, और locally सिर्फ़ दिखावट है"। SMEs के IT staff और Windows app developers के लिए, यह लेख Microsoft Learn के primary sources से placeholder कैसे काम करते हैं, file attributes से status कैसे तय करें, business app के typical जाल, development side और IT side क्या कर सकते हैं, और जब कहा जाए "file नहीं खुलती" तो triage process को व्यवस्थित करता है।

Business app की implicit assumption का replacementBusiness app की implicit assumption कि file local disk पर है, बिना किसी के decision के इस assumption से बदल दी गई कि actual content cloud में है और locally सिर्फ़ दिखावट हैपुरानी implicit assumptionLocal disk पर actual contentReplace हो चुकी assumptionActual content cloud में हैLocally सिर्फ़ दिखावट हैएक placeholder

चित्र 1: Assumption कि "actual content local है" बिना किसी के decision के "actual content cloud में है; locally सिर्फ़ दिखावट है" से बदल दी गई।

1. पहले निष्कर्ष

  • Desktop, Documents और Pictures KFM से C:\Users\<name>\OneDrive\ के नीचे चले गए हो सकते हैं। नया PC के initial setup पर यह चालू होता है, और organization policy से bulk में apply भी कर सकता है। Fixed path मानने वाला app यहाँ टूटता है।1
  • Current sync app में Files On-Demand default रूप से चालू हैं। दूसरे device या web पर बनाई files बिना local content वाले "online-only" placeholder के रूप में दिखती हैं।23
  • Placeholder की actual पहचान Cloud Files API (cldflt.sys minifilter) द्वारा managed reparse point है। Explorer और file API दोनों को यह ordinary file लगती है, और खोलने पर automatic download (hydration) होता है।4
  • Status file attributes से तय की जा सकती है। FILE_ATTRIBUTE_OFFLINE, RECALL_ON_DATA_ACCESS, PINNED, UNPINNED आदि flags हैं, और attrib command उन्हें O, P और U letters से दिखाता है। सिर्फ़ attributes check करने से download नहीं होता।567
  • Business app की typical accidents "नहीं खुलती", "slow", "attributes गलत तय", "watch events का तूफ़ान" और "sync से conflict" का combination हैं। Offline या OneDrive रुकने पर hydration fail होता है, और batch process हर file का download trigger करता है।48
  • App-side response "placeholder का सम्मान" है। Base enumeration के समय attributes से decision और लापरवाही से न खोलना, ज़रूरत हो तो FILE_FLAG_OPEN_NO_RECALL, और data folder OneDrive के नीचे न रखना है।910
  • IT-side response "pin से operations" और "policy से control" है। Business folders की actual content "Always keep on this device" से सुनिश्चित करें, और Group Policy / Intune से KFM तथा Files On-Demand जानबूझकर configure करें। यह न भूलें कि Storage Sense भी "unused files को online-only लौटा" सकता है।1112

एक वाक्य में: "Explorer में दिखने वाली file" और "local disk पर actual content वाली file" अब एक ही चीज़ नहीं हैं।

2. क्या हो रहा है — KFM और Files On-Demand

2.1. Desktop अब C:\Users\<name>\Desktop नहीं रह सकता

OneDrive sync app में Known Folder Move (KFM) नाम की feature है। Settings screen पर यह "Backup", "Back up important folders" आदि दिखती है; चालू होने पर actual Desktop, Documents और Pictures OneDrive folder के नीचे move (redirect) हो जाते हैं।1

User जो location देखता है KFM से पहले actual path KFM के बाद actual path
Desktop C:\Users\taro\Desktop C:\Users\taro\OneDrive\Desktop
Documents C:\Users\taro\Documents C:\Users\taro\OneDrive\Documents
Pictures C:\Users\taro\Pictures C:\Users\taro\OneDrive\Pictures

नए PC के initial setup (OOBE) पर Microsoft account या work account से sign in व्यापक रूप से folder backup को default proposal के रूप में दिखाता है, और जैसे-का-तैसा आगे बढ़ना इसे चालू कर देता है। Organization user से कुछ पूछे बिना bulk में apply भी कर सकता है, "Silently move Windows known folders to OneDrive" policy (KFMSilentOptIn) से।111

दो paths जिनसे KFM चालू होता हैनए PC के initial setup पर account से sign in folder backup को default proposal दिखाता है और जैसे-का-तैसा आगे बढ़ना इसे चालू करता है; organization में KFMSilentOptIn policy user से पूछे बिना bulk में apply करती हैनए PC का initial setupAccount से sign inBackup default रूप से proposedजैसे-का-तैसा आगे बढ़ना चालू करता हैOrganization policyKFMSilentOptInबिना पूछे bulk में applyKFM चालू

चित्र 2: KFM बिना किसी के notice के चालू होता है, चाहे initial setup का default proposal हो या organization की silent-apply policy।

असुविधा यह है कि Explorer में दिखावट लगभग नहीं बदलती। Shell known-folder API (SHGetKnownFolderPath और .NET का Environment.GetFolderPath) move के बाद सही path लौटाते हैं, इसलिए सुव्यवस्थित app चलता रहता है। जो टूटता है वह app है जो settings file या code में C:\Users\%USERNAME%\Desktop जैसा fixed path embed करता है। PC बदलने के बाद import का "file not found" से fail होना इसी pattern का है।

KFM के बाद app का path resolution व्यवहारKFM actual Desktop और समान folders OneDrive के नीचे ले जाने के बाद known-folder API वाला app सही path से चलता रहता है, पर fixed path embed करने वाला app file not found से fail होता हैKnown-folder APIHardcoded fixed pathKFM चालूActual Desktop आदि OneDrive के नीचे जाते हैंApp path कैसे resolve करता है?Move के बाद सही path पाता है और चलता रहता हैFile not found

चित्र 3: KFM के बाद known-folder API वाला app चलता रहता है, पर fixed path hardcode करने वाला app यहाँ टूटता है।

2.2. Files On-Demand — दिखती हैं, पर actual content नहीं

दूसरा सूत्र Files On-Demand है। चालू environment में OneDrive की हर file Explorer में दिखती है, पर file खुलने तक content download नहीं होती। Current sync app में यह feature default चालू है, और Microsoft भी चालू रखने की सलाह देता है।23

Status Explorer के status icon से बताई जा सकती है।13

Icon Status Local content
Cloud icon Online-only नहीं (सिर्फ़ placeholder)
सफ़ेद background पर tick Locally available मौजूद (बाद में automatic free हो सकती है)
हरे background पर सफ़ेद tick Always keep on this device (pin) मौजूद (automatic free होने से बाहर)

यहाँ महत्वपूर्ण मध्य status है। एक बार खोली गई और अब local content वाली file user की "Free up space" action या बाद में चर्चित Storage Sense से online-only लौट सकती है। यही "पिछले महीने चलता था" जैसी कठिन-reproduce failure का एक कारण है।312

Files On-Demand की तीन statuses और transitionOnline-only file खुलने पर locally available हो जाती है, पर Free up space या Storage Sense उसे online-only लौटा सकते हैं, और सिर्फ़ pinned file automatic free होने से बाहर हैखोलें (hydration)Free up spaceStorage SenseAlways keep on this deviceAlways keep on this deviceUnpinOnline-only (cloud icon)Locally availablePin (Always keep on this device)

चित्र 4: Files On-Demand की तीन statuses। "Locally available" automatic online-only लौट सकती है; pin उससे बाहर है।

3. Placeholder की actual पहचान — Cloud Files API और reparse point

Files On-Demand Windows 10 version 1709 में आए OS mechanism Cloud Files API पर बनी हैं। File-system side की working unit cldflt.sys नाम का minifilter है (service name CldFlt, "Windows Cloud Files Filter Driver"), और OneDrive इस API का उपयोग करने वाले "sync providers" में से एक है।47

Placeholder technically reparse point है। File system पर सिर्फ़ name, size और timestamp जैसी metadata (लगभग 1KB) होती है; content data नहीं होता। जब app file खोलकर पढ़ता है, minifilter request पहचानता है, sync provider को data transfer करने को कहता है, download पूरा होने तक wait करता है, फिर read आगे बढ़ता है। इस प्राप्ति को hydration कहते हैं; local content फेंककर placeholder पर लौटना dehydration है।4

Placeholder खुलने पर hydrationजब app placeholder खोलकर पढ़ता है, cldflt.sys minifilter request पहचानता है, sync provider को data transfer करने को कहता है, download पूरा होने तक wait करता है, फिर read आगे बढ़ता हैSync providercldflt.sys minifilterBusiness appSync providercldflt.sys minifilterBusiness appOpen और read का requestData transfer का निर्देशDownload completeRead आगे बढ़ता है

चित्र 5: Placeholder का read minifilter के sync provider से data मँगवाने के बाद आगे बढ़ता है।

"Reparse point" सुनकर existing code की compatibility की चिंता होती है जो "पहचानने पर reparse point को special behavior देता है", पर compatibility के लिए Cloud Files API sync engine और %systemroot% के नीचे की processes को छोड़कर सभी से यह तथ्य छिपाती है कि यह reparse point है। Ordinary app को यह "सिर्फ़ थोड़ी slow खुलने वाली ordinary file" लगती है। वह पूर्ण transparency, feature के साथ-साथ, यही कारण भी है कि "app को बिना notice अपनी assumptions टूटी मिलती हैं"।4 Reparse point का mechanism स्वयं "NTFS Internals" में समझाया गया है।

Reparse point छिपाना, और दिखावट का अंतरPlaceholder की actual पहचान reparse point है, पर Cloud Files API इसे sync engine के अलावा processes से छिपाती है, इसलिए ordinary app को यह सिर्फ़ थोड़ी slow खुलने वाली ordinary file लगती हैSync engine आदिकोई अन्य appPlaceholder (reparse point)किस process ने खोला?Reparse point के रूप में दिखता हैOrdinary file लगती हैसिर्फ़ थोड़ी slow खुलती लगती है

चित्र 6: यह reparse point है यह तथ्य sync engine के अलावा सभी से छिपा है, और ordinary app को यह ordinary file लगती है।

Explorer properties में placeholder की विशेषता यह है कि "Size" original size दिखाता है, जबकि "Size on disk" लगभग 0 है। Assumption कि "size है, तो actual content होनी चाहिए" यहाँ नहीं चलती।

Properties में placeholder कैसा दिखता हैExplorer properties में placeholder Size के रूप में original size दिखाता है जबकि Size on disk लगभग 0 है, इसलिए assumption कि size है अतः actual content होनी चाहिए नहीं चलतीPlaceholder propertiesSize original size हैSize on disk लगभग 0Assumption कि actual content होनी चाहिएLocal content नहीं है

चित्र 7: Placeholder "Size" में original size दिखाता है जबकि "Size on disk" लगभग 0 है।

4. File attributes status बताते हैं

Placeholder status ordinary file attributes के रूप में published होती है। मुख्य इस प्रकार हैं।5

Attribute Value अर्थ
FILE_ATTRIBUTE_OFFLINE 0x00001000 Data तुरंत available नहीं (hierarchical storage management का traditional attribute)
FILE_ATTRIBUTE_RECALL_ON_OPEN 0x00040000 Physical local content नहीं। सिर्फ़ directory-enumeration results में दिखता है
FILE_ATTRIBUTE_PINNED 0x00080000 User का intent "हमेशा local रखें" (pin)
FILE_ATTRIBUTE_UNPINNED 0x00100000 Local content रखने की आवश्यकता नहीं (online-only बनाने का intent)
FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS 0x00400000 कुछ या सारी content local नहीं। Read remote से recall करता है

Command Prompt का attrib इन्हें एक letter से दिखा और set कर सकता है। O offline attribute है, P pin, U unpin।6 OneDrive Files On-Demand status से match Microsoft documentation में इस प्रकार व्यवस्थित है।7

Files On-Demand status Attribute Set करने की command
Always available (pin) Pinned (P दिखता है) attrib +p <path>
Locally available न P न U attrib -p <path>
Online-only Unpinned (U दिखता है) attrib +u <path>

एक चेतावनी। Status बदलने का क्रम होता है। जब online-only (U) file को "locally available" बनाना हो, अकेले -p चलाने से U लगा रहता है और actual content नहीं आती। Microsoft documentation भी पहले +p (always available) से actual content download करने फिर -p की process दिखाता है।7 Existing status को reliably बदलने वाले scripts में एक साथ विपरीत attributes साफ़ करना सुरक्षित है, जैसे attrib +p -u।

Online-only से locally available पर switch करने का क्रमOnline-only file पर अकेले attrib -p चलाने से U attribute रहता है और actual content नहीं आती; पहले attrib +p से actual content download कर फिर -p की process चाहिएकेवल attrib -pattrib +pattrib -pOnline-only (U)U रहता है; actual content नहीं आतीPin (actual content download)Locally available

चित्र 8: Online-only से switch करने के लिए पहले +p से actual content लें फिर -p का क्रम चाहिए।

PowerShell में decision का उदाहरण। सिर्फ़ attributes देखने से hydration नहीं होता, इसलिए जाँच और bulk check के लिए निश्चिंत होकर उपयोग करें।

function Test-CloudPlaceholder {
    param([Parameter(Mandatory)][string]$Path)

    $value = [int](Get-Item -LiteralPath $Path -Force).Attributes

    [pscustomobject]@{
        Path               = $Path
        Offline            = ($value -band 0x00001000) -ne 0  # FILE_ATTRIBUTE_OFFLINE
        RecallOnDataAccess = ($value -band 0x00400000) -ne 0  # सारी content local नहीं
        Pinned             = ($value -band 0x00080000) -ne 0  # Always keep on this device
        Unpinned           = ($value -band 0x00100000) -ne 0  # Online-only
    }
}

# Documents folder के नीचे CSV की bulk check (content download नहीं होती)।
# Path known-folder API से resolve करें। Display name
# "Documents" hardcode करने से actual folder name
# (Documents बनाम localized name) और KFM configuration के अनुसार nonexistent path बन सकता है
Get-ChildItem ([Environment]::GetFolderPath('MyDocuments')) -Recurse -Filter *.csv |
    ForEach-Object { Test-CloudPlaceholder $_.FullName } |
    Where-Object RecallOnDataAccess |
    Format-Table -AutoSize

[int] में cast इसलिए है कि .NET की FileAttributes enum RECALL_ON_DATA_ACCESS जैसे names define नहीं करती। Numeric values पर bitwise operations बिना कठिनाई decision कर सकती हैं।

5. Business app जिन जालों में पड़ता है

यह मुख्य विषय है। Placeholder transparency अधिकतर सुविधाजनक है, पर business app के typical processing patterns से मिलकर निम्नलिखित छह रूपों में सामने आती है।

5.1. खोलना automatic download शुरू करता है — offline "नहीं खुलती"

Online-only file खोलने से तुरंत hydration शुरू होता है। Online, छोटी file पर इतना तेज़ कि notice नहीं होता, पर जब OneDrive रुका, sign out या pause हो, network खराब हो, या file बड़ी हो, तो यह "मौजूद पर नहीं खुलने वाली file" बन जाती है। Error ERROR_CLOUD_FILE_PROVIDER_NOT_RUNNING (0x8007016A, “The cloud file provider is not running”) जैसे cloud-file family codes के रूप में लौट सकती है, या app side पर timeout के रूप में देखी जा सकती है।8

आगे का जाल यह है कि File.Exists() के समकक्ष existence check, और attributes या size लेना, succeed होते हैं। Local-disk intuition से न समझ आने वाला error pattern मिलता है: "existence check pass हुई, पर read fail"।

Online-only file तक access करने पर branchesExistence check तथा attributes और size लेना succeed होते हैं, पर content पढ़ना hydration शुरू करता है; OneDrive चल रहा हो और network healthy हो तो download के बाद पढ़ सकते हैं, अन्यथा 0x8007016A जैसी error या timeout से failहाँनहींExistence check, या attributes या size लेनाSucceedContent पढ़नाHydration शुरूOneDrive चल रहा और network healthy?Download के बाद readable0x8007016A जैसी error, या timeout

चित्र 9: Existence check succeed हो सकती है जबकि read fail हो। Success या failure OneDrive चलने और network पर निर्भर है।

5.2. Batch process हर file का download trigger करता है

Folder की हर file पढ़ने वाला batch, hash calculation, full-text search, या घर का बना backup OneDrive के नीचे के tree पर चलाएँ तो आप जिस हर file को छूते हैं उसका hydration trigger होता है। कई GB के folder पर process abnormally slow हो जाती है, download disk भी भरता है, और कम capacity वाले PC पर free space की कमी दूसरी failure बुलाती है। Files On-Demand से बचने वाली capacity एक full scan में गायब हो जाती है।

साथ ही, यदि app explicit user action के बिना hydration करता है, Windows toast दिखाकर user को block का option दे सकता है। एक बार block होने पर वह app उसके बाद download में fail रहता है (Settings में "Automatic file downloads" से हटा सकते हैं)। यही "import सिर्फ़ किसी खास PC पर fail" का एक कारण है।4

Batch कैसे हर file का download trigger करता हैOneDrive के नीचे batch हर छुई file का hydration trigger करता है, processing delay और disk pressure लाता है, और यदि user toast पर block करे तो उसके बाद download fail रहते हैंहाँनहींOneDrive के नीचे batchछुई हर file का hydrationProcessing delay और disk pressureToast दिख सकता हैक्या user ने block किया?उसके बाद download fail रहते हैंDownload जारी

चित्र 10: Batch हर file का hydration trigger करता है, और toast पर block होने पर failures उसके बाद जारी रहती हैं।

5.3. Attributes की अपेक्षा न करने वाले code का गलत व्यवहार

जो code FILE_ATTRIBUTE_OFFLINE या RECALL_ON_DATA_ACCESS नहीं जानता वह unexpected जगह गलत व्यवहार करता है।

  • Attributes exact equality से check होते हैं (attributes == FileAttributes.Archive आदि), इसलिए placeholder "unexpected file" के रूप में बाहर या error माना जाता है
  • Backup या sync tool का exclusion decision OFFLINE attribute को "पहले से tape पर भेजा गया" समझकर छोड़ देता है (या, उलटा, हर वह file लाता है जिसे छोड़ना चाहिए था)
  • Read-only check या archive-bit operation attribute combination तोड़ देती है
Attributes की अपेक्षा न करने वाले code के गलत व्यवहार patternsPlaceholder attributes न जानने वाला code exact-equality check से exclusion या error, OFFLINE की गलत व्याख्या से छोड़ना या full recall, या attribute combination तोड़ने के रूप में गलत व्यवहार करता हैAttributes की अपेक्षा न करने वाला codeExact-equality checkOFFLINE की गलत व्याख्याAttribute operation combination तोड़ती हैUnexpected के रूप में बाहर या errorछोड़ना, या full recall

चित्र 11: OFFLINE या RECALL-family attributes न जानने वाला code exclusion, गलत छोड़ने या attribute destruction के रूप में गलत व्यवहार करता है।

Minifilter developers के लिए Microsoft guidance साफ़ कहता है कि RECALL_ON_DATA_ACCESS वाली file पर लापरवाह read या write न करें। Documentation kernel drivers के लिए है, पर principle "इस attribute वाली file की content छूना = recall cost होती है" user-mode app पर ज्यों का त्यों लागू होता है।10

5.4. FileSystemWatcher और sync की interaction

OneDrive के नीचे folder को FileSystemWatcher से देखें तो न सिर्फ़ user actions बल्कि sync app activity से बड़ी संख्या में events भी मिलते हैं। हर बार दूसरे device का बदलाव sync होता है, और हर बार hydration या dehydration attributes या size बदलता है, Changed event जल सकता है। आगे, जो design watch-and-import का result उसी folder में वापस लिखता है वह write → upload → attribute update → दूसरा event के loop में "change notifications का तूफ़ान" बन जाता है। Event thinning और actual-content check design "A Practical Guide to FileSystemWatcher" में cover है, पर OneDrive के नीचे उसकी आवश्यकता एक स्तर ऊँची है।

Watching और वापस लिखने से change-notification loopयदि change event पाने वाला watching app import result उसी folder में लिखे, sync app का upload और attribute update दूसरा event जलाते हैं, और यह loop बन जाता है — change notifications का तूफ़ानChange eventWatching app import करता हैउसी folder में वापस लिखेंSync app upload करता हैAttributes या size updateदूसरे device से बदलाव का sync

चित्र 12: Import result उसी folder में लिखना उस loop में बदल जाता है जिसमें sync app activity दूसरा event पैदा करती है।

5.5. Exclusive lock के दौरान sync conflict, और "copy" files

जब business app file exclusive lock से खोले रखता है, sync app उस file को न upload कर सकता है न update। लंबे समय lock पकड़े apps (Access .accdb, घर के बने format की data file, log file आदि) को OneDrive के नीचे रखना sync errors को normal state बना देता है। उलटा, जब वही file कई PCs पर edit हो, sync app दोनों versions रखने की कोशिश करता है और PC name या "— copy" जैसी conflict copies पैदा करता है। "एक folder, एक file" मानने वाला import इस duplicate पर गलत व्यवहार करता है। Lock design के मूल "Mutual Exclusion Fundamentals for File-Based Integration" में हैं।

Exclusive lock और multi-PC edit से sync problemsजब app file exclusive lock से खोले sync app update नहीं कर सकता और sync errors normal हो जाती हैं; कई PCs पर वही file edit करने से conflict copy पैदा होती है और एक-folder-एक-file assumption गिरती हैApp exclusive lock से खोलता हैSync नहीं हो सकता; errors normalवही file कई PCs पर editConflict copy पैदाPC name या copy वाला duplicateएक-folder-एक-file assumption गिरती है

चित्र 13: Exclusive lock sync errors को normal बनाता है, और कई PCs पर edit conflict copy से गलत व्यवहार बुलाता है।

5.6. Antivirus और search indexer hydration trigger करते हैं

सिर्फ़ business app ही file content नहीं पढ़ता। Antivirus software का full scan, और search indexer, placeholder की content छूने पर hydration भी trigger करते हैं। Microsoft Defender जैसे products on-demand scan पर RECALL_ON_DATA_ACCESS attribute वाली files छोड़ देते हैं, पर यह product-side response है, और यह नहीं मान सकते कि हर security product वही सावधानी दिखाएगा। यदि "scan time हर रात network और disk चरम पर" या "online-only मानी गई files सुबह तक सब physical हो चुकी" जैसे लक्षण दिखें, इस पंक्ति पर संदेह करें।14

Security product या search indexer से triggered hydrationजब full scan या search indexer placeholder content छूता है, RECALL attribute का सम्मान करने वाला product छोड़ता है, न करने वाला हर file hydrate करता है और रात bandwidth pressure या सुबह physicalization लाता हैसम्मान करने वाला productन करने वाला productFull scan या search indexerRECALL attribute का सम्मान?Placeholder छोड़ता हैContent छूकर hydrate करता हैरात को bandwidth और disk चरमसुबह तक files सब physical

चित्र 14: Attribute का सम्मान न करने वाला scan हर file का hydration trigger करता है, और रात load या सुबह physicalization के रूप में दिखता है।

6. App-development response — placeholder का सम्मान करें

Developer के रूप में मूल policy placeholder को "टूटी file" नहीं बल्कि "recall cost वाली file" मानना है।

  • Enumeration के समय attributes से decision करें, और लापरवाही से न खोलें। Folder scan में पहले attributes से (अध्याय 4 का decision) confirm करें कि online-only है या नहीं, और सिर्फ़ वे files खोलें जिनकी content चाहिए। "गायब होने पर घातक नहीं" processing — log collection, hash calculation, preview generation — को placeholder छोड़ने का option दें।
// .NET में FileAttributes जो मान define नहीं करता उन्हें संख्या के रूप में define करें
const FileAttributes RecallOnDataAccess = (FileAttributes)0x00400000;
const FileAttributes RecallOnOpen       = (FileAttributes)0x00040000;

static bool IsCloudPlaceholder(FileAttributes attributes) =>
    (attributes & (RecallOnDataAccess | RecallOnOpen | FileAttributes.Offline)) != 0;

foreach (var file in new DirectoryInfo(watchFolder).EnumerateFiles("*.csv"))
{
    if (IsCloudPlaceholder(file.Attributes))
    {
        log.Warn($"{file.Name} online-only है; इस बार छोड़ रहे हैं");
        continue;
    }
    Import(file.FullName);
}
Enumeration के समय attributes से decision फिर खोलने का pathFolder scan में पहले enumeration पर attributes confirm करें; यदि placeholder हो तो छोड़ें और warning log छोड़ें, और import सिर्फ़ अन्य files पर चलाएँ, ताकि लापरवाह hydration टलेहाँनहींEnumeration पर attributes confirm करेंPlaceholder?छोड़ें और warning log छोड़ेंImport चलाएँसिर्फ़ आवश्यक content वाली files खोलने की policy

चित्र 15: Enumeration के समय attributes से decision करें और placeholder बिना खोले छोड़ें, ताकि लापरवाह hydration टले।

  • ध्यान दें कि FILE_FLAG_OPEN_NO_RECALL "download न करें" की guarantee नहीं है। CreateFile पर यह flag यह intent दिखा सकता है कि "recalled data remote side पर रहे और local storage पर वापस न लिखा जाए"। पर यह flag सिर्फ़ recalled data को local resident न बनाने के लिए है; यदि content पढ़ें तो data transfer स्वयं होता ही है। यदि bandwidth और latency स्वयं बचाना हो, attributes, size और timestamp पर ही समाप्त करें — read access न माँगें (access rights 0 से खोलें, enumeration result की metadata उपयोग करें)। यही सबसे सुरक्षित है।9
FILE_FLAG_OPEN_NO_RECALL का प्रभाव और सीमाएँFILE_FLAG_OPEN_NO_RECALL recalled data को local resident न बनाने का flag है; content पढ़ने पर data transfer स्वयं होता है, इसलिए transfer बचाने के लिए सबसे सुरक्षित attributes जैसी metadata पर समाप्त करना हैNO_RECALL flag से खोलेंContent पढ़ेंData transfer होता हैLocal resident नहीं बनतासिर्फ़ metadata पर समाप्तकोई transfer नहीं; सबसे सुरक्षित

चित्र 16: FILE_FLAG_OPEN_NO_RECALL सिर्फ़ local resident होने से रोकता है; transfer स्वयं बचाना हो तो सिर्फ़ metadata पर समाप्त करें।

  • Error message में "यह OneDrive के नीचे है" रखें। Read की failure पर सिर्फ़ यह confirm कि target path %OneDrive% के नीचे है और उसे message में शामिल करना field और help desk का triage time बहुत घटाता है। 0x8007016A जैसी cloud-file family error पहचानें तो ideal है user को "कृपया OneDrive की status जाँचें" कहना।
  • App का data folder OneDrive के नीचे न रखें। KFM environment में "Documents" भी OneDrive के नीचे हैं। App की settings, databases और working files %ProgramData% या %LocalAppData% में रखें, और Desktop या Documents को default save location या default import folder न चुनें। क्या कहाँ रखें यह decision "How to Choose Where a Windows App Stores Local Data" में संक्षेपित है।
  • जब user OneDrive के नीचे location चुने तो व्यवहार तय करें। Save location चुनने देने वाले app के लिए spec में पहले से design decision शामिल करें जैसे चुना path OneDrive के नीचे होने पर warning (OneDrive / OneDriveCommercial environment variable के path के नीचे), या सिर्फ़ lock file या DB रखने से इनकार।

7. IT-side response — pin और policy से control

IT की स्थिति से यथार्थ operations "Files On-Demand पूरी तरह बंद करें" नहीं बल्कि actual content सिर्फ़ वहाँ सुनिश्चित करना जहाँ business को चाहिए है।

  • Business app जिन folders को पढ़ता है उन्हें pin करें। Explorer के right-click menu से "Always keep on this device" चुनें, या imaging script से attrib +p -u <folder> /s /d चलाएँ (-u एक साथ specify करें ताकि पहले से online-only files का मिश्रण reliably pin पर switch हो)। Pinned file की actual content locally सुनिश्चित है और बाद में चर्चित online-only automatic conversion से भी बाहर है।72
  • KFM और Files On-Demand "जानबूझकर" configure करें, "ध्यान देने पर चालू मिला" नहीं। मुख्य policies (Group Policy / Intune) इस प्रकार हैं।111
उद्देश्य Policy (registry value) प्रभाव
Files On-Demand का control Use OneDrive Files On-Demand (FilesOnDemandEnabled) चालू: नए users default online-only। बंद: classic full sync
KFM का bulk apply Silently move Windows known folders to OneDrive (KFMSilentOptIn) बिना user action Desktop आदि ले जाएँ
KFM मना करें Prevent users from moving their Windows known folders to OneDrive (KFMBlockOptIn) Known folders move करना मना
KFM बंद करना मना करें Prevent users from redirecting their Windows known folders to their PC (KFMBlockOptOut) User को बंद करना मना
Team-site capacity घटाएँ Convert synced team site files to online-only (DehydrateSyncedTeamSites) Synced team sites online-only करें (ध्यान दें कि यह actual content गायब होने की दिशा में काम करता है)
  • जानें Storage Sense कैसे चलता है। Storage Sense में feature है जो कई दिनों से न खोली गई cloud files को automatic online-only लौटाती है, और दिनों की संख्या policy (ConfigStorageSenseCloudContentDehydrationThreshold) से configure कर सकते हैं। Default 0 है (automatic न लौटाएँ), पर यदि user ने Settings screen से चालू किया हो, या organization ने कम capacity वाले devices के लिए configure किया हो, "पिछले सप्ताह खुली file cloud icon पर लौट गई" normal व्यवहार के रूप में होता है। Pinned file scope से बाहर है, इसलिए "business folders pin करें" यहाँ भी काम करता है।122
Storage Sense के online-only automatic conversion की branchesStorage Sense के automatic free करने में pinned file scope से बाहर है और actual content रहती है; कई दिनों से न खोली गई unpinned file online-only लौटती हैहाँनहींहाँनहींStorage Sense automatic freePin?Scope से बाहर; actual content रहती हैकई दिनों से नहीं खुली?Online-only लौटीActual content रहती हैDefault 0 automatic नहीं लौटाता

चित्र 17: Storage Sense कई दिनों से न खोली गई file को online-only लौटाता है, पर pin scope से बाहर है।

  • Files On-Demand disable करने से पहले प्रभाव अनुमानित करें। FilesOnDemandEnabled disable करना classic full-download sync बन जाता है, पर disk खपत और पहली sync का bandwidth load उछलता है। Microsoft चालू रखने की सलाह देता है, और disable करने को limited measure मानें जब confirm हो जाए कि "target users का data volume छोटा है" और "disk सिर है"।112
  • Support process में शामिल करें। अगले अध्याय की triage process को "Desktop की file नहीं खुलती" inquiry template में रखने से संभालने वाला व्यक्ति बदलने पर भी response की quality रहती है।

8. Triage process — जब कहा जाए "file नहीं खुलती"

परामर्श लेते समय ऊपर से नीचे confirm करें।

# क्या confirm करें कैसे क्या सीखते हैं
1 क्या path OneDrive के नीचे है? echo %OneDrive% से sync root confirm करें और target path से मिलाएँ। Explorer address bar में "Desktop" का actual path भी confirm करें क्या KFM / OneDrive शामिल है
2 File की status attrib <path> से U (online-only), P (pin) और O confirm करें। Properties में "Size on disk" भी देखें क्या actual content local है, या placeholder है
3 क्या OneDrive चल रहा है Taskbar icon (sign in, pause, error), Get-Process OneDrive क्या hydration संभव है। 0x8007016A usually रुका या गलत configure8
4 Network Corporate proxy, bandwidth, OneDrive service तक access क्या download स्वयं संभव है
5 Free disk space Target volume पर free space। कम capacity पर OneDrive download block करने की policy भी होती है Hydration failure का दूसरा कारक
6 Failure का record App का error code और समय note करें, और sync app के error display से मिलाएँ Problem app-side है या OneDrive-side

Interim fix target folder पर right-click कर "Always keep on this device" चुनना है (या attrib +p /s /d)। इससे actual content locally व्यवस्थित होती है और business फिर चल सकता है। उसके ऊपर permanent response के रूप में तय करें कि आवश्यक कारण app side (अध्याय 6) है या IT side (अध्याय 7)।

Interim से permanent response तक का pathInterim रूप से target folder को Always keep on this device set करने से actual content local व्यवस्थित होती है ताकि business फिर चले; उसके ऊपर तय करते हैं कि आवश्यक कारण app side है या IT side और permanent response की ओर बढ़ते हैंApp sideIT sideInterim रूप से pin करेंActual content local व्यवस्थितBusiness फिर चलता हैआवश्यक कारण कहाँ है?अध्याय 6 response की ओरअध्याय 7 response की ओर

चित्र 18: Interim measure pin करना, actual content व्यवस्थित करना और business फिर चलाना है; permanent response app side या IT side तय करने के बाद आगे बढ़ती है।

यदि यहाँ तक confirm कर ली और "path OneDrive के नीचे नहीं" तथा "placeholder भी नहीं", तो shared folder या path length जैसे अन्य regular कारणों पर जाएँ। "Pitfalls of Network Drives and UNC Paths" और "MAX_PATH and Windows Path/Filename Pitfalls" आगे का नक्शा हैं।

9. सारांश

  • KFM ने actual Desktop, Documents और Pictures C:\Users\<name>\OneDrive\ के नीचे ले जाए हो सकते हैं। Fixed path मानने वाला app यहाँ टूटता है। Known-folder API से resolve करना पहला कदम है।
  • Files On-Demand default चालू हैं, और बिना local content वाले placeholder naturally मौजूद हैं। Placeholder Cloud Files API (cldflt.sys) reparse point है, और खोलने पर automatic hydrate होता है।
  • Status file attributes (OFFLINE / RECALL_ON_DATA_ACCESS / PINNED / UNPINNED) से तय होती है और attrib में O, P और U के रूप में दिखती है। सिर्फ़ attributes check करने से download नहीं होता।
  • Business-app accidents offline hydration failure, batch से full download, attributes की अपेक्षा न करने वाला code, FileSystemWatcher और sync की interaction, exclusive lock और sync का conflict, तथा security product से triggered hydration के रूप में दिखती हैं।
  • App side पर base "attributes से decision करें और लापरवाही से न खोलें", "data folder OneDrive के नीचे न रखें", और "error पर कहें कि यह OneDrive के नीचे है" हैं।
  • IT side पर "business folders pin करना" और "KFM, Files On-Demand तथा Storage Sense का policy control" से intended status बनाते हैं।
  • Triage path → attrib → OneDrive चल रहा → network → free space → record के क्रम में यंत्रवत चल सकता है।

अगली बार जब कहा जाए "file है पर नहीं खुलती", पहले यह पूछें।

क्या वह file सचमुच local disk पर है? या वहाँ सिर्फ़ cloud की दिखावट बैठी है?

संबंधित लेख

संबंधित परामर्श क्षेत्र

KomuraSoft LLC OneDrive और cloud storage से जुड़ी business-app failures की जाँच संभालती है — "पहले चलने वाला import PC बदलने के बाद नहीं चलता", "file सिर्फ़ किसी खास PC पर नहीं खुलती" — placeholder मानने वाले file processing और watch processing का design तथा सुधार, और KFM / Files On-Demand environment में save location design की reviews। लक्षण अलग करने से शुरू करना ठीक है — कृपया संपर्क करें।

संदर्भ लिंक

  1. Microsoft Learn, Redirect and move Windows known folders to OneDrive. कि KFM Desktop, Documents और Pictures OneDrive के नीचे ले जाता है, तथा proposal, silent-apply, बंद करना मना और move मना policies। ↩ ↩2 ↩3 ↩4

  2. Microsoft Learn, Recommended sync app configuration. कि Files On-Demand default चालू हैं और चालू रखना recommended है, और कि Storage Sense "pin न की गई locally available files" साफ़ करता है। ↩ ↩2 ↩3 ↩4 ↩5

  3. Microsoft Support, Save disk space with OneDrive Files On-Demand for Windows. Files On-Demand की तीन statuses तथा "Always keep on this device" और "Free up space" actions। ↩ ↩2 ↩3

  4. Microsoft Learn, Build a Cloud Sync Engine that Supports Placeholder Files. Cloud Files API का overview, कि placeholder सिर्फ़ लगभग 1KB metadata रखता है और खोलने पर automatic hydrate होता है, कि reparse point sync engine और %systemroot% के नीचे के अलावा processes से छिपा है, तथा background hydration का toast और block। ↩ ↩2 ↩3 ↩4 ↩5 ↩6

  5. Microsoft Learn, File Attribute Constants. FILE_ATTRIBUTE_OFFLINE, RECALL_ON_OPEN, RECALL_ON_DATA_ACCESS, PINNED और UNPINNED की definitions और values। ↩ ↩2

  6. Microsoft Learn, attrib. attrib command syntax और O (offline), P (pin) तथा U (unpin) सहित attribute flags। ↩ ↩2

  7. Microsoft Learn, Query and set Files On-Demand states in Windows. attrib से Files On-Demand status confirm और +p, -p तथा +u से set करना, और CldFlt service। ↩ ↩2 ↩3 ↩4 ↩5

  8. Microsoft Learn, Error 0x8007016a when copying files in OneDrive. कि error 0x8007016A “The cloud file provider is not running” तब होती है जब OneDrive गलत configure या रुका हो, तथा समाधान चरण। ↩ ↩2 ↩3

  9. Microsoft Learn, CreateFileW function (fileapi.h). कि FILE_FLAG_OPEN_NO_RECALL वह flag है जो कहता है "requested data remote side पर रहे और local storage पर वापस न जाए" (यह data स्वयं recall होने से नहीं रोकता), तथा access rights 0 से खोलकर attributes प्राप्त करना। ↩ ↩2

  10. Microsoft Learn, Handling placeholders. कि placeholder पर FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS होना चाहिए, और इस attribute वाली file पर लापरवाह read या write unnecessary hydration या data damage बुलाता है। ↩ ↩2

  11. Microsoft Learn, IT Admins - Use OneDrive policies to control sync settings. GPO/Intune से OneDrive sync app configure करने की policies, सहित FilesOnDemandEnabled, KFMSilentOptIn, KFMBlockOptIn, KFMBlockOptOut और DehydrateSyncedTeamSites। ↩ ↩2 ↩3 ↩4

  12. Microsoft Learn, Policy CSP - Storage. कि Storage Sense कई दिनों से न खोली गई cloud files को online-only बना सकता है, default 0 (automatic न लौटाएँ), और 0–365 दिन configuration। ↩ ↩2 ↩3

  13. Microsoft Support, What do the OneDrive icons mean?. Explorer में दिखाए status icons का अर्थ, जैसे cloud और tick marks। ↩

  14. Microsoft Learn, Plan for an Azure File Sync deployment. कि antivirus scan RECALL_ON_DATA_ACCESS attribute वाली file का recall कर सकता है, और कि Microsoft Defender जैसे products on-demand scan पर इस attribute वाली files छोड़ते हैं। ↩

निकटवर्ती विषयों में गहराई से जाने के लिए समान टैग वाले नवीनतम लेख।

"Not Responding" वास्तव में क्या है — Windows ऐप के hang का फैसला कैसे करता है, और hang न करने वाले ऐप कैसे design करें

Windows का "Not Responding" वह mechanism है जिसमें OS तय करता है कि window ने 5 सेकंड message नहीं लिया और उसे ghost window से बदल देता ह...

ये पृष्ठ विषय को सेवाओं और निर्णयों के व्यापक संदर्भ में रखते हैं।

यह लेख निम्नलिखित सेवाओं से सीधे जुड़ा है।

अक्सर पूछे जाने वाले प्रश्न

इस लेख के विषय पर परामर्श में अक्सर पूछे जाने वाले प्रश्न।

एक business app कहता है "file not found" और desktop पर रखी CSV नहीं पढ़ पाता। क्यों?
कई मामलों में Desktop folder खुद OneDrive के Known Folder Move (KFM) से C:\Users\<user name>\OneDrive\Desktop के नीचे चला गया है, या file सिर्फ़ online-only placeholder बन गई है। जो app C:\Users\<user name>\Desktop जैसा fixed path मानता है वह move के बाद file नहीं पाता। Path सही होने पर भी, OneDrive रुकने या network खराब होने पर online-only file खुलने में fail हो सकती है। पहले confirm करें कि target path OneDrive के नीचे है या नहीं, और attrib command से देखें कि U (online-only) लगा है या नहीं। Interim fix के रूप में right-click menu पर "Always keep on this device" से actual content locally pin कर सकते हैं।
क्या कोई program बता सकता है कि file online-only है?
हाँ। Online-only placeholder FILE_ATTRIBUTE_OFFLINE और FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS (0x00400000) जैसे attributes रखता है, इसलिए content download किए बिना file attributes से status तय कर सकते हैं। Attributes लेना या folder enumerate करना hydration (download) नहीं करता। .NET में कुछ values FileAttributes पर defined नहीं हैं, इसलिए integer में cast करके bitwise operations से check करें। अगर सच में content पढ़े बिना खोलना हो, तो CreateFile का FILE_FLAG_OPEN_NO_RECALL भी available है।
Files On-Demand बंद करने से problem हल हो जाती है?
इसे last resort मानें। बंद करने से sync scope की हर file locally download होती है, इसलिए disk capacity और पहली sync का network load बड़ा हो जाता है, और Microsoft भी इसे चालू रखने की सलाह देता है। Practice में ज़्यादा लचीला यही है कि business app जिन folders को पढ़ता है उन्हें ही "Always keep on this device" (pin) करें। ज़्यादा मौलिक और reliable fix यह है कि app का data folder और import folder OneDrive के management के नीचे न हों।
मैंने "Always keep on this device" set किया, फिर भी कुछ files आखिर में cloud icon पर लौट जाती हैं। क्यों?
पहले attrib command से confirm करें कि file में सचमुच pin (P attribute) है। Pinned file Storage Sense के online-only automatic conversion से बाहर है, लेकिन जो file सिर्फ़ इसलिए "locally available" है कि किसी ने उसे खोला, बिना pin के, Storage Sense settings और policy के अनुसार कुछ समय बाद online-only लौट सकती है। User की अपनी "Free up space" action, और team-site files को online-only बनाने वाली policy (DehydrateSyncedTeamSites), भी cloud icon लौटाती हैं। Business के लिए locally रहने वाले folders पर folder-scope में pin करके चलाएँ।

लेखक की प्रोफ़ाइल

लेख के लेखक का परिचय पृष्ठ।

Go Komura

KomuraSoft LLC के प्रतिनिधि

Windows सॉफ़्टवेयर विकास, तकनीकी परामर्श और बग जाँच में विशेषज्ञ, विशेष रूप से मौजूदा सिस्टम वाली परियोजनाओं और पुनरुत्पादन में कठिन बग में।

सार्वजनिक लिंक

ब्लॉग पर लौटें