Sign in to follow this  
Followers 0
Calistoga

FileMove *.* with exceptions

11 posts in this topic

Hi all

Im am working on a simple script that will copy all files from on directory to another (from the desktop).

For example for moving all .exe files I use:

FileMove(@DesktopDir & "\*.exe", @DesktopDir & "\Random\", 9)

However, I want to move all files except from shortcuts (.lnk) is there any simple way to accomplish that?

Thanks in advance

Share this post


Link to post
Share on other sites



why would it move shortcuts when you clearly commanded to move exe. tho moving the files could render some shortcuts invalid


----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Sorry, I want to use this code:

FileMove(@DesktopDir & "\*.*", @DesktopDir & "\Random\", 9)

But I want it not to move .lnk/shortcuts.

Edited by Encoded

Share this post


Link to post
Share on other sites

FileMove(@DesktopDir & "\*.*", @DesktopDir & "\Random\", 9)

FileMove(@DesktopDir & "\Random\*.lnk", @DesktopDir, 9)

The stupidest solution (uh i mean simplest) is oftenly the best one


----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Share this post


Link to post
Share on other sites

True, that works. However the icon layout will be totally messed up.

Share this post


Link to post
Share on other sites

True, that works. However the icon layout will be totally messed up.

what do you mean


----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Share this post


Link to post
Share on other sites

The icons will not be placed at the old position when you move them back from the \Random folder. Or am I wrong here?

Share this post


Link to post
Share on other sites

Depends how youre icons are being aranged on the desktop in the first place . But aligned to grid or auto arrange when you take everything away and then just put back the links they will still populate the first free places so I think no scattering should occur


----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Ok, I'll give it a try.

EDIT:

Tested on two machines, XP and Vista. Works perfectly.

Thanks C2C for making me try it =P

Edited by Encoded

Share this post


Link to post
Share on other sites

Np bro. Glad you made it. I wish i came up with some more genius-ier :D solution but hey this works :D

Ring if ya need anything


----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Share this post


Link to post
Share on other sites

I certainly will :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0