Help with Python and arguments on windows

Home made / NONE
January 9, 2010 at 09:52:50
Specs: Windows XP, 2.8 ghz / 2 gig
I know most topics here are batch (I've gotten tons of batch help before) but I'll take a chance.

I have a python script which I call with file names as arguments. The script processes the files, but that isn't the important part.

I have the script in the Sendto folder so I can select files then right click and then have the script run with the selected files as arguments. Well windows operating systems seem to have a limit on the length of arguments and it throws an error if the length of the arguments is too long.

Windows cannot access the specified device, path or file. You may not have the appropriate permissions to access the item.

that's the error thrown when too many files are given as arguments. I know there is a way around this stupid limit. Winrar for example you can select hundreds of files and right click then add them all to an archive. I just need help finding how to do that with python.

See More: Help with Python and arguments on windows

Report •

January 9, 2010 at 17:09:48
Winrar uses a shell extension handler, so it doesn't get its
arguments on the command line, but gets them straight into a
DLL that is loaded with Explorer. I don't know if this is possible in
Python, but have a look at pywin32, which has lots of Windows extensions.

Report •
Related Solutions

Ask Question