473,387 Members | 3,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

file copy shutil

Joe
I see this on python.org

"Caveat: On MacOS, the resource fork and other metadata are not used.
For file copies, this means that resources will be lost and file type
and creator codes will not be correct."

Is there a way to copy files correctly on BOTH Mac and Windows? I am
trying to write a utility that will work on both platforms identically
since I am in a mixed environment network. Thanks.
Jul 18 '05 #1
1 1333
he*******@hotmail.com (Joe) writes:
I see this on python.org

"Caveat: On MacOS, the resource fork and other metadata are not used.
For file copies, this means that resources will be lost and file type
and creator codes will not be correct."

Is there a way to copy files correctly on BOTH Mac and Windows? I am
trying to write a utility that will work on both platforms identically
since I am in a mixed environment network. Thanks.


Look at distutils.file_util (or someting like that...)

Cheers,
mwh

--
Usenet is like a herd of performing elephants with diarrhea --
massive, difficult to redirect, awe-inspiring, entertaining, and
a source of mind-boggling amounts of excrement when you least
expect it. -- spaf (1992)
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Patrick Useldinger | last post by:
Hi, I think I found a bug in the write method of file objects. It seems as if before writing each block, a check was done in order to verifiy that there is enough space left for the *whole*...
3
by: Ben Kial | last post by:
I need to write a program to "copy" files and preserved the files' atime, mtime, ctime, file permissions. I also need to have this program working in Unix and Windows, where the "Archive"...
7
by: Kamus of Kadizhar | last post by:
Thanks to everyone on this list. I now have a functioning piece of python code!! :-)) Now I'm trying to clean it up. I have the same (or similar) lines repeated several times: ...
1
by: bmgz | last post by:
I am have made a simple script that moves all desktop clutter (ie files that are not *.lnk) to a specified folder eg. c:\myhome\mydocs\desktopdebris\2003-12-16 ...
7
by: Eric Belanger | last post by:
Hi, Before posting I made sure I upgraded from 2.3.3 to 2.3.4, but the problem is still here. Ive created a little script which, at the end of it, deals with copying two files. All the script...
5
by: Thomas Lotze | last post by:
Hi, another question: What's the most efficient way of copying data between two file-like objects? f1.write(f2.read()) doesn't seem to me as efficient as it might be, as a string containing...
3
by: Phoe6 | last post by:
Hi all, I had a filesystem crash and when I retrieved the data back the files had random names without extension. I decided to write a script to determine the file extension and create a newfile...
6
by: elake | last post by:
I found this thread about a pst file in Windows being locked and I am having the same issue. ...
4
by: loial | last post by:
I am writing a file in python with writelines f = open('/home/john/myfile',"w") f.writelines("line1\n") f.writelines("line2\n") f.close() But whenever I try to do anything with the file in...
4
by: Roopesh | last post by:
Hi, I have a multithreaded application. There are two threads, T1 and T2. Suppose that there are two folders A, B. Thread T1 fetches data from network and creates files in folder A and after...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.