Manage PlItems

You may optionally enter a comparison operator (<, <=, >, >=, <> or =) at the beginning of each of your search values to specify how the comparison should be done.

Advanced Search
Displaying 61-70 of 300 results.
IDPlCodelangPlGroupPlItemTitleCode 
 
74DelphiTypenkonvertierungString in Integer konvertierenMyInt:=StrToInt('125');View Update Delete
75C#TypenkonvertierungString in Integer konvertierenint MyInt if (Int32.TryParse("125", out MyInt)) { // Parsing was successfull } View Update Delete
278PowerShellFilehandlingPrüfen ob Verzeichnis existiert$myFolder = "C:\TEMP" if ((Test-Path $myFolder) -eq $true) { write-host "Folder exists!" } else { write-host "Folder doesn't exist!" }View Update Delete
280PythonFilehandlingPrüfen ob Verzeichnis existiertimport os.path from os import path myFolder = "/tmp/test" if path.exists(myFolder) & path.isdir(myFolder): print "Folder exists!" else: print "Folder doesn't exist!"View Update Delete
281PythonFilehandlingVerzeichnis erstellenimport os myFolder = "/tmp/test" try: os.mkdir(myFolder) except OSError: print ("Error creating directory: %s" % myFolder) else: print ("Directory created: %s " % myFolder)View Update Delete
285Bash ScriptFilehandlingApplikations-/Script-Verzeichnis ermitteln#!/bin/sh # The script is located in /tmp/abc/myscript.sh export AppPath=$(dirname $0) echo $0 # /tmp/abc/myscript.sh echo $AppPath # /tmp/abcView Update Delete
44DelphiFilehandlingDatei auf dem Betriebssystem ausführenprocedure TForm1.MenuDummy1Click(Sender: TObject); var ExeName : array[0..255] of char; myFile : String; begin myFile:='winword.exe'; Showmessage('Starte: ' + myFile); StrPCopy(ExeName, myFile); ShellExecute(MainForm.Handle, 'open', ExeName, nil, nil, SW_SHOWNORMAL); // Drucken geht dann so (siehe auch Dateitypen im Windows Explorer): ShellExecute(MainForm.Handle, 'print', ExeName, nil, nil, SW_SHOWNORMAL); end;View Update Delete
70PythonFilehandlingVerzeichnis rekursiv durchsuchenimport os searchPath = '/home/patrick/Desktop/' # os.walk will go through all subdirectories for pathentry in os.walk(searchPath, False): for dir in pathentry[1]: path = os.path.join(pathentry[0], dir) if os.path.islink(path): print path + "... is a link" # os.unlink(path) else: print path + "... is a dir" # os.rmdir(path) for file in pathentry[2]: path = os.path.join(pathentry[0], file) # os.unlink(path) print path + "... is a file" # os.listdir only the given path for file in os.listdir(searchPath): fullfilename = os.path.join(searchPath, file) if os.path.isfile(fullfilename): print fullfilename + "... is a file"View Update Delete
77DelphiFilehandlingApplikations-/Script-Verzeichnis ermittelnAppPath:=ExtractFilePath(Application.Exename);View Update Delete
94C#FilehandlingAlle Dateien aus Verzeichnis auslesenprivate void ReadAllFilesInDir(string path) { DirectoryInfo dirInfo = new DirectoryInfo(path); FileInfo[] files = dirInfo.GetFiles(); foreach (FileInfo fiOutput in files) { Console.WriteLine(fiOutput.Name); } }View Update Delete