Accessing windoze file attributes

D

Douglas

Environment: X86, 1Gb RAM, Win XP, latest SP, Excel 2003.

Hi, can anyone direct a relative newbie to the best source of info?
I am writing my own backup app in Python 2.5.2 (all my company will
allow me to use) using IDLE.
I intend to run this app daily via the Task Scheduler to back up a
mission-critical spreadsheet that only I use.
It works well enough, but now I want to make it sensitive to the "A"
attribute (only backup the file if it is set), and update it
afterwards (unset it). This will help me avoid wasted disk due to
needless backups.
I have searched the inter-web and not found any info on how to do
access/alter Windows file attributes.
Please can someone direct me to a web page with suitable info
(preferably with code snyppyts)?
Many thanks, in advance.
-- Douglas
 
D

Diez B. Roggisch

Douglas said:
Hi, can anyone direct a relative newbie to the best source of info?
I am writing my own backup app in Python 2.5.2 (all my company will
allow me to use) using IDLE.
I intend to run this app daily via the Task Scheduler to back up a
mission-critical spreadsheet that only I use.
It works well enough, but now I want to make it sensitive to the "A"
attribute (only backup the file if it is set), and update it
afterwards (unset it). This will help me avoid wasted disk due to
needless backups.
I have searched the inter-web and not found any info on how to do
access/alter Windows file attributes.
Please can someone direct me to a web page with suitable info
(preferably with code snyppyts)?

No windows nowhere here, but os.stat should be your friend.

Diez
 
D

David Robinow

Environment: X86, 1Gb RAM, Win XP, latest SP, Excel 2003.

Hi, can anyone direct a relative newbie to the best source of info?
I am writing my own backup app in Python 2.5.2 (all my company will
allow me to use) using IDLE.
I intend to run this app daily via the Task Scheduler to back up a
mission-critical spreadsheet that only I use.
It works well enough, but now I want to make it sensitive to the "A"
attribute (only backup the file if it is set), and update it
afterwards (unset it). This will help me avoid wasted disk due to
needless backups.
I have searched the inter-web and not found any info on how to do
access/alter Windows file attributes.
Please can someone direct me to a web page with suitable info
(preferably with code snyppyts)?

http://code.activestate.com/recipes/303343-changing-file-attributes-on-windows/
 
L

Lawrence D'Oliveiro

In message
Douglas said:
It works well enough, but now I want to make it sensitive to the "A"
attribute (only backup the file if it is set), and update it
afterwards (unset it). This will help me avoid wasted disk due to
needless backups.

Why reinvent rsync?
 
D

Douglas

@Diez and @David
Thanks guys. Both excellent leads. Colour me happy. I can now make
progress and meet some deadlines. :)

@Lawrence
Why reinvent rsync?
In what way is rsync relevant to the stated problem? Did you actually
READ the question?
Note: I use Linux at home (yes, even rsync) and very much prefer it to
Windows. However, at work I have no choice but to use the resources
the company provides - which is Windows; have you got that straight
now?
If you have something more helpful and mature to say, relevant to the
actual question, then I will gladly hear it, and even apologise.
Otherwise, don't bother. I already enough from respondents who were
far more adult, knowledgeable and helpful ... and all the more
impressive in comparison.

Sincerely,
-- Douglas
 
L

Lawrence D'Oliveiro

In message
Douglas said:
In what way is rsync relevant to the stated problem? Did you actually
READ the question?
Yes.

Note: I use Linux at home (yes, even rsync) and very much prefer it to
Windows. However, at work I have no choice but to use the resources
the company provides - which is Windows; have you got that straight
now?

Doesn’t change the fact that you’re reinventing rsync.
 
D

Dave Angel

@Diez and @David
Thanks guys. Both excellent leads. Colour me happy. I can now make
progress and meet some deadlines. :)

@Lawrence
In what way is rsync relevant to the stated problem? Did you actually
READ the question?
Note: I use Linux at home (yes, even rsync) and very much prefer it to
Windows. However, at work I have no choice but to use the resources
the company provides - which is Windows; have you got that straight
now?
If you have something more helpful and mature to say, relevant to the
actual question, then I will gladly hear it, and even apologise.
Otherwise, don't bother. I already enough from respondents who were
far more adult, knowledgeable and helpful ... and all the more
impressive in comparison.

Sincerely,
-- Douglas

Let's see. You're a first-time poster on this forum, and you choose to
attack Lawrence, who was giving you a succinct reference to a possible
solution to your problem.

So how does mentioning a program that could directly solve your problem
constitute immature and unhelpful response?

Have you checked out any of the several rsync implementations on
Windows? Some require cygwin, but there are a couple that would seem
not to. Maybe try http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp
or http://www.itefix.no/i2/node/10650

There are several reasons why any particular one of these may not be
appropriate for your needs, but being stuck on Windows isn't really one
of them.


DaveA
 
D

Douglas

@Dave
Grateful thanks for your web site suggestions, and I will look them
up.

@Lawrence
Pleasee accept my apologies. I mistook your brevity for a superior
snotty attitude.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top