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 221-230 of 300 results.
IDPlCodelangPlGroupPlItemTitleCode 
 
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
166PythonFilehandlingDatei auf dem Betriebssystem ausführenimport commands output=commands.getoutput("dir") print output # home tmp myFile.shView Update Delete
175Bash ScriptFilehandlingVerzeichnis rekursiv durchsuchen# http://wiki.ubuntuusers.de/Shell/Bash-Skripting-Guide_f%C3%BCr_Anf%C3%A4nger#Variablen-Teil-2 #!/bin/bash for file in /home/myUser/*/*.png ; do echo "Diese Datei: $file" fname=$(basename "$file") echo "hat den Namen: $fname" fdir=$(dirname "$file") echo "und steht im Verzeichnis: $fdir" # Diese Datei: /home/myUser/galaxy.png # hat den Namen: galaxy.png # und steht im Verzeichnis: /home/myUser View Update Delete
176Bash ScriptFilehandlingPrüfen ob Datei existiert# http://wiki.ubuntuusers.de/Shell/Bash-Skripting-Guide_f%C3%BCr_Anf%C3%A4nger#If-Else-Anweisung #!/bin/bash filePath="/home/myUser/test.txt" if [ -f ${filePath} ] then echo "There it is! ;-)" else echo "Whow, file is missing at this place :-(" fiView Update Delete
177DelphiFilehandlingPrüfen ob Datei existiertprocedure TForm1.CheckIfFileExists(); var filePath : String; begin filePath:='C:\User\myUser\text.txt'; if FileExists(filePath) then begin ShowMessage('There it is! ;-)'); end else begin ShowMessage('Whow, file is missing at this place :-('); end; end;View Update Delete
178C#FilehandlingPrüfen ob Datei existiertString filePath = "C:\\User\\myUser\\text.txt"; if (System.IO.File.Exists(filePath)) { MessageBox.Show("There it is! ;-)"); } else { MessageBox.Show("Whow, file is missing at this place :-("); }View Update Delete