FLaky Posted February 21, 2013 Share Posted February 21, 2013 Mrb arkadaşlar..Istediğim dizinde uzantısız bi dosya oluşturmak istiyorum dosyada herhangi bi veri olmıycak sadece uzantısız bi dosya olacak..Elimde bununla ilgili bi VBScript kodu war onunla yapabiliyorum ancak autoitle yapmak istiyorum.. VBScript kodları [spoiler] On Error Resume Next 'Declare global variables Dim objFSO : Dim objFile 'Instantiate objects Set objFSO = CreateObject("Scripting.FilesystemObject") 'Loop through subfolders in C:\Users For Each objSub in objFSO.GetFolder("C:\Users").SubFolders 'Confirm that folders are not system folders If objSub.Name <> "All Users" And objSub.Name <> "Default" And objSub.Name <> "Default User" And objSub.Name <> "Public"Then 'Create necessary subdir If Not objFSO.FolderExists(objSub & "\AppData\Roaming\Adobe\AIR") Then objFSO.CreateFolder objSub & "\AppData\Roaming\Adobe\AIR" End If 'Create file indicating acceptance of the EULA Set objFile = objFSO.CreateTextFile(objSub & "\AppData\Roaming\Adobe\AIR\eulaAccepted", True) 'Close file objFile.Close 'Create file indicating disabling of updates Set objFile = objFSO.CreateTextFile(objSub & "\AppData\Roaming\Adobe\AIR\UpdateDisabled", True) 'Close file objFile.Close End If Next [/spoiler] Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted February 21, 2013 Editor Share Posted February 21, 2013 Help dosyasında mevcut. #include <File.au3> If Not _FileCreate("C:\file") Then MsgBox(4096, "Error", " Error Creating/Resetting log. error:" & @error) EndIf Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted February 21, 2013 Share Posted February 21, 2013 ;VA On Error Resume Next ;Declare global variables Dim $objFSO $: Dim $objFile ;Instantiate objects $objFSO = ObjCreate("Scripting.FilesystemObject") ;Loop through subfolders in C:\Users For $objSub in $objFSO.GetFolder("C:\Users").SubFolders ;Confirm that folders are not system folders If $objSub.Name <> "All Users" And $objSub.Name <> "Default" And $objSub.Name <> "Default User" And $objSub.Name <> "Public"Then ;Create necessary subdir If Not $objFSO.FolderExists($objSub & "\AppData\Roaming\Adobe\AIR") Then $objFSO.CreateFolder ($objSub & "\AppData\Roaming\Adobe\AIR") EndIf ;Create file indicating acceptance of the EULA $objFile = $objFSO.CreateTextFile($objSub & "\AppData\Roaming\Adobe\AIR\eulaAccepted", 1) ;Close file $objFile.Close() ;Create file indicating disabling of updates $objFile = $objFSO.CreateTextFile($objSub & "\AppData\Roaming\Adobe\AIR\UpdateDisabled", 1) ;Close file $objFile.Close() EndIf Next au3 şeklinde düzenlendi Quote Link to comment Share on other sites More sharing options...
SimpsoN_Bart Posted February 21, 2013 Share Posted February 21, 2013 Tek satır iş için bu kadar koda gerek yok, pairs dostumuz gayet güzel bir örnek vermiş hem çevirdiğiniz kodlar pek de çalışacak gibi durmuyor ayrıca karışık. Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted February 21, 2013 Share Posted February 21, 2013 Tek satır iş için bu kadar koda gerek yok, pairs dostumuz gayet güzel bir örnek vermiş hem çevirdiğiniz kodlar pek de çalışacak gibi durmuyor ayrıca karışık. pairs dostumuzun kodları kısa dogru ,ben sadece vbs kodunu au3 çevirmek istedim bu kadar uzun koda gerçekten gerek yok yani haklısın SimpsoN_Bart dostum Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.