×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

check file exists, copy, move, delete etc...

check file exists, copy, move, delete etc...

check file exists, copy, move, delete etc...

(OP)
Hello,

I need some method of checking a file exists and then copying it,
moving it and deleting the original source etc...

As I have not done much of this before I thought it wise to ask
the experts!

Reading about it seems that Fso seems a common way of doing these things.

Is this the best / most reliable approach?

As always many thanks for any advice.

Mark.

RE: check file exists, copy, move, delete etc...


Hello,

You don't say what operating system you are running, but if using windows, then I would use Windows Explorer - navigate to the folder your files could be in, see if they are there, and do what you want.

Macs are fairly similar - Linux I don't know well enough to help.

RE: check file exists, copy, move, delete etc...

I think the OP may be asking about programmatic access, rather than GUI browsing. And, given this is an Access forum, I think we can safely conclude the OS is Windows.

RE: check file exists, copy, move, delete etc...

(OP)
Sorry for clarity, I am using Windows 7 and Access 2013.

I am looking at determining a method for the following:

1. To check a folder exists.
2. To check a file exists
3. To copy a file to a new location and and rename the file.
4. To delete a file
5. To check weather a file is open
6. To check whether a file is read only.

Am I correct to think that if a file is open, it can not be
Copied or deleted?

Also if a file is read only, I think it has to be changed to
none read only before copying.

I "think" there are various approaches to this and was wondering how others
approach this. I want to achieve the above via vba.

Many thanks.

Regards Mark.

RE: check file exists, copy, move, delete etc...

Most of the answers - if not all of them - you can find here smile

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.

RE: check file exists, copy, move, delete etc...


"I think the OP may be asking about programmatic access, rather than GUI browsing. And, given this is an Access forum, I think we can safely conclude the OS is Windows. " by Strongman

My apologies, I misunderstood.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close