Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8134327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:58:41+00:00 2026-06-06T09:58:41+00:00

Okay, so I’m developing an application that will allow users to select file objects

  • 0

Okay, so I’m developing an application that will allow users to select file objects in a menu and will allow them to copy said selections to another location. I have so far managed to use the pywin32 module to allow me to copy files using Windows’ native file copier.

The code for it:

from win32com.shell import shell, shellcon
srcstr = chr( 0 ).join( [ file[0] for file in files ] )
deststr = chr( 0 ).join( [ file[1] for file in files ] )
shell.SHFileOperation(
    ( 0, shellcon.FO_COPY, srcstr, deststr, shellcon.FOF_MULTIDESTFILES, None, None )
)

This is a fine method for copying under Windows, but I was wondering if there is a way to accomplish the same goal under Mac and/or Linux.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T09:58:43+00:00Added an answer on June 6, 2026 at 9:58 am

    On Mac, you’ll need to script Finder.

    One way to do this is with ScriptingBridge. To start with:

    import ScriptingBridge
    f = ScriptingBridge.SBApplication.applicationWithBundleIdentifier_("com.apple.Finder")
    

    Then… well, fire up AppleScript Editor, look at Finder’s Dictionary, and figure out how to translate that from AppleScript into Python+ScriptingBridge, and if you have any problems, come back and ask again. But here are some hints:

    The trick is to get from a path to a Finder reference. And there’s no easy way to get there directly. Instead, you have to start with startupDisk, call folders() on it, filter for name == the first component of path, and repeat. See http://developer.apple.com/library/mac/#samplecode/ScriptingBridgeFinder/Listings/Controller_m.html (which is written in Objective C, not Python, but the ScriptingBridge parts are pretty easy to translate).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, so I want to make a menu that expands down at the current
Okay I have a csv file that gets parsed and displayed. I want to
Okay, so in this program I'm making, users will be able to create shortcuts
Okay I have a large CRUD app that uses tabs with Forms embedded in
Okay, here's the rundown. I'm developing a video hosting site with PHP and jQuery
Okay, so I'm trying to make a game that uses this algorithm: http://www.codeproject.com/Articles/15573/2D-Polygon-Collision-Detection But
Okay I have created an application where in one of the screens I have
Okay, I have hundreds of .net controls with text attributes that needs to be
Okay so what I have is a table that keeps track of history on
Okay, here's the scenario. I have a utility that processes tons of records, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.