Grabs the location and name of the script file itself.

Member Avatar
Member Avatar
-1 forum 3

Whats wrong with this, doesnt make sense that it wont create the folder or files. If PathRead() = 0 Then MsgBox("Error Reading Path Info: One or more Paths do not exist.", MsgBoxStyle.Critical, "Path Read Error") MsgBox("Would you like to create these files?", MsgBoxStyle.YesNo, "Create?") If MsgBoxResult.Yes Then MkDir("/Paths/") System.IO.File.Create("/Paths/aPath.txt") System.IO.File.Create("/Paths/mPath.txt") System.IO.File.Create("/Paths/lPath.txt") System.IO.File.Create("/Paths/wPath.txt") End If End If

Member Avatar
Member Avatar
+0 forum 2

What we have done was : Specifying valid FTP remote server name, a username and a password if password required in their relevant textboxes on the form then we click on connect, we notice that the TreeView control is filled with main directories while ListBox control is filled with main files root, that required setting up the Treeview first in the Design-Time (IDE) then we did the same to the ListBox control as well to correctly receive data returned from the FTP remote server. While recieving the data we've changed the cursor shape beside tracking down the ftp server status …

Member Avatar
+0 forum 0

I am a beginner to pything and I am looking to monitor a directory and run a script everytime something is input into the directory. I am wondering the best method for doing this using python? Any point in the right direction I would appreciate.

Member Avatar
Member Avatar
+0 forum 4

Ok, for some strange reason I cannot move from the "Python27" folder: I have tried this... Python 2.7.3 (default, Apr 10 2012, 23:31:26) Type "help", "copyright", "credits" or "license" for more information. >>> from os import system >>> system('cd') C:\Python27 0 >>> system('cd ..') 0 >>> system('cd') C:\Python27 0 It did not change directory; why?

Member Avatar
Member Avatar
+0 forum 2

Hi, I'm pretty new to Python. Working in 2.4 due to company restraints. I'm trying to use os.path.walk to work through a tree directory, and perform different actions on the files based on the name of the file. I thought if I used "startwith" it would indicate that files only called "roads." would be processed. Unfortunatly it just goes ahead and processes all the files in the directories. I don't know a better way! Any help would be much appreciated. The code has been simplified to just show this problem. [CODE]import sys, os def treeDir (arg, dirpath, basenames): workspace = …

Member Avatar
Member Avatar
+0 forum 3

Hey. I'm trying to open a dir under safe mode. and i keep getting this error : Fatal error: Uncaught exception 'RuntimeException' with message 'DirectoryIterator::__construct() [<a href='directoryiterator.--construct'>directoryiterator.--construct</a>]: Unable to access /home/mypath/mysite.com/public_html/path/to' in /home/mypath/mysite.com/public_html/site/loaddir.php:7 Stack trace: #0 /home/mypath/mysite.com/public_html/site/loaddir.php(7): DirectoryIterator->__construct('/home/mypath...') #1 {main} thrown in /home/mypath/mysite.co/public_html/site/loaddir.php on line 7 my question is : is there a way i can open a dir under safe mode? or maybe my code is wrong? [CODE] $root = $_SERVER["DOCUMENT_ROOT"]; $path = "/path/to"; $allowed = array('jpg','gif','bmp'); $iterator = new DirectoryIterator($root.$path); foreach ($iterator as $fileinfo) { if ($fileinfo->isFile()) { $path = $fileinfo->getPathname(); $filename = $fileinfo->getFilename(); $info = pathinfo($filename); $ext …

Member Avatar
Member Avatar
+0 forum 4

The End.