On Fri, May 30, 2014 at 9:20 PM, Marko Randjelovic <marko...@eunet.rs> wrote:
>> Can you try the Python script on that, please? File system encodings
>> can be a bit of a pain at times. If it doesn't work as "python", try
>> "python3", as the two are a bit different as regards Unicode.
>>
>> ChrisA
>>
>>
>
> No problem, but please give me the python code to execute.

The few lines I posted previously:

import os
for root, dirs, files in os.walk('.'):
    if len(dirs + files) == 1: print(root)

Save those to a file, run that. It should print out, one per line, the
names of directories with just one file or subdir; but I don't know
how it'll go with different FS encodings.

ChrisA


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/CAPTjJmo_YDCaXTPj7YV7ExYfHwYmTxjHTeU14PLDPQ8gD=k...@mail.gmail.com

Reply via email to