~stuff
34 itemsDownload ./*

34 itemsDownload ./*

..
AnaAI-nsfw.url
TwilyApp.url
ana-ougmegle.url
anacam-adultery~.$
anacam-links.url
caramelldansen.url
chatnicks.png
dysphoria-spotify-playlist.url
euphoria-spotify-playlist.url
ffmpeg-gif-record
habitat-spotify-playlist.url
homepage.webm
linux-tools.jpg
mirrorflipnoise.mp4
new-linux-prep
newstartfile3.blend
newstartfile3.mp4
onedrivesub.vbs
openbox-size-hint-patch
pick-your-drug.url
scrot-video
serenity-spotify-playlist.url
streamit
twily-stream-service
twily.2024.nsfw.gif
twily.deviantart.url
twily.gif
twily.screenfetch.png
twily.webm
twilyScheme.png
twilypastes.url
unicode_list
void2.url
water_fantasy_art_artwork_huts_2560x1440_....


stuffonedrivesub.vbs
1 403•  6 years ago•  DownloadRawClose
6 years ago•  1 403

{}
' Author:      Twily aka Analie 2018
' Description: Make Windows OneDrive folder and subfolders accessible from Linux system.
'              Run this script before powering off Windows, then boot Linux!
'              (Untested: can also be scheduled to run on Windows login).
'              NB: Depending on how many files, it may take a bit to complete (Personal
'              estimation on own computer; 30 seconds for 2000 entries).

'On Error Resume Next

Dim PATH, TEMP, STR, BATCH, EXEC, ACTION
PATH = "C:\Users\awv\OneDrive"
TEMP = "C:\TEMP\ONEDRIVESUB.TXT"
EXEC = "C:\TEMP\ONEDRIVESUB.BAT"
BATCH = "@ECHO OFF" & vbNewLine & "CLS" & vbNewLine & "fsutil reparsepoint delete """ & PATH & """" & vbNewLine

Set WshShell = WScript.CreateObject("WScript.Shell")
'Return = WshShell.Run("CMD /C DIR """ & PATH & """ /S /AD /B > """ & TEMP & """",0,True)
Return = WshShell.Run("CMD /C DIR """ & PATH & """ /S /B > """ & TEMP & """",0,True)

Set FSO = CreateObject("Scripting.FileSystemObject")

Set FILE = FSO.OpenTextFile(TEMP)
Do Until FILE.AtEndOfStream
	STR = FILE.ReadLine
	
	If VarType(STR) = 8 Then
		If STR <> "" Then
			BATCH = BATCH & "fsutil reparsepoint delete """ & STR & """" & vbNewLine
		End If
	End If
Loop
FILE.Close

If FSO.FileExists(TEMP) Then
	FSO.DeleteFile TEMP
End If

Set FILE = FSO.CreateTextFile(EXEC,True)
FILE.Write BATCH
FILE.Close

Return = WshShell.Run("CMD /C """ & EXEC & """",0,True)

If FSO.FileExists(EXEC) Then
	FSO.DeleteFile EXEC
End If

'WScript.Echo "Done (OneDrive reparse point):" & vbNewLine & vbNewLine & """" & PATH & """ and all its content have had their reparsepoint deleted, you can now access from linux!"
ACTION = MsgBox("OneDrive reparse point deletion is completed." & vbNewLine & vbNewLine & "Do you wish to reboot your computer now?", vbQuestion + vbYesNo , "OneDrive Reparse Points Deleted")
Select Case ACTION
	Case vbYes
		Return = WshShell.Run("CMD /C SHUTDOWN /R /T 0",0,True)
	Case vbNo
End Select

WScript.Quit

Top
©twily.info 2013 - 2024
twily at twily dot info



2 169 919 visits
... ^ v