Hi, all, I am writing a program that renames files inside OS
directories the user provides. I am at the early stage of writing it
and I encountered some problems.
Below is my code. There is an error i received when i run this code.
The error is, WindowsError: [Error 123] The filename, directory na
On Aug 8, 4:15 pm, Chris Rebert wrote:
> On Sun, Aug 8, 2010 at 1:02 AM, blur959 wrote:
> > Hi, all, I am writing a program that renames files inside OS
> > directories the user provides. I am at the early stage of writing it
> > and I encountered some problems.
>
> &
On Aug 8, 6:05 pm, Thomas Jollans wrote:
> On 08/08/2010 10:35 AM, blur959 wrote:
>
>
>
> > On Aug 8, 4:15 pm, Chris Rebert wrote:
> >> On Sun, Aug 8, 2010 at 1:02 AM, blur959 wrote:
> >>> Hi, all, I am writing a program that renames files inside OS
>
On Aug 8, 7:45 pm, Thomas Jollans wrote:
> On 08/08/2010 12:23 PM, blur959 wrote:
>
>
>
> > On Aug 8, 6:05 pm, Thomas Jollans wrote:
> >> On 08/08/2010 10:35 AM, blur959 wrote:
>
> >>> On Aug 8, 4:15 pm, Chris Rebert wrote:
> >>>> On Sun
On Aug 8, 9:13 pm, Thomas Jollans wrote:
> On 08/08/2010 02:35 PM, blur959 wrote:
>
> > Sorry, This is my first time using the os commands in python, Ok,
> > firstly, I entered "C:\" inside raw_input and stored it inside
> > fileroot. When i print repr(filer
Hi, all, I am working on a simple program that renames files based on
the directory the user gives, the names the user searched and the
names the user want to replace. However, I encounter some problems.
When I try running the script, when it gets to the os.rename part,
there will be an error. The
On Aug 9, 6:01 pm, Chris Rebert wrote:
> On Mon, Aug 9, 2010 at 2:44 AM, blur959 wrote:
> > Hi, all, I am working on a simple program that renames files based on
> > the directory the user gives, the names the user searched and the
> > names the user want to replace. Howe
Hi, all, I wonder if my post is relevant here, but i will still post
it anyway. I am working on creating a custom UI inside Maya and I
encountered some problems. Firstly, I am trying to create a textfield
button that creates a locator-shaped curve based on the coordinates
the user keyed into the te
Hi all, I am creating a program that renames all files of the similar
file type. But i am stuck at this part. I tried running this code and
I got this error:new_name = os.rename(path, newpath)
WindowsError: [Error 183] Cannot create a file when that file already
exists. Hope you guys could help
Hi, all, Is there a way to get a number of files in a particular
directory? I tried using os.walk, os.listdir but they are return me
with a list, tuple of the files, etc. But I want it to return a
number. Is it possible?
--
http://mail.python.org/mailman/listinfo/python-list
Hi, I tried that, but it doesn't seem to work. My file directory has
many different files extensions, and I want it to return me a number
based on the number of files with similar files extensions. But when I
tried running it, I get many weird numbers. Below is my code i had so
far and the result.
On Aug 13, 6:09 pm, Peter Otten <__pete...@web.de> wrote:
> blur959 wrote:
> > Hi, I tried that, but it doesn't seem to work. My file directory has
> > many different files extensions, and I want it to return me a number
> > based on the number of files with simi
Hi all, I got a problem with my script. Everything looks good so far
but for some reason my os.rename isn't working. Can anyone tell me
why? Hope you guys could help. Thanks.
import os
import glob
directory = raw_input("directory? ")
ext = raw_input("file extension? ")
r = raw_input("replace na
13 matches
Mail list logo