Sign in to follow this  
Followers 0
safdar19

question about creating folders and moving files

7 posts in this topic

Hello everyone

I have a folder that have thousands of  image files

I want to organize them, by creating folders within the root folder, and moving 300 files in each newly created folder according to there last modified time.

I not posible to sort acording to last modified time, random moving of files will also do. New  folders should be named as 1, 2, 3 etc. Not able to fuigure out how to do it. 

Any help ?

Safdar

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I would start with

FileListToArray

FileGetTime for sorting

_ArraySort

For Next loop

Create new folder with a $var

and after 300 Create new folder with $var +1

FileMove ...

Edited by Xenobiologist

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Not able to fuigure out how to do it. Any help ?

I would start with reading the Help file, becoming familiar with what can be done with AutoIt. As I'm browsing thru the Help file, thoughts would cross my mind, like, "Hmm, this'll do what I want.". BTW, all the functions mentioned above by Xenobiologist will do just what you're looking for. Now I'm sure that sooner or later someone here will post some code that may or may not be just what you're looking to do, but I suggest coming up with some code yourself, then post it and any "why?" questions..

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Thanks for the help.

The funtions mentioned by Xenobiologist has got me started.

Share this post


Link to post
Share on other sites

When I run

For $var = 1 to 3
   DirCreate($var)
      Next

It creates folders named 1 to 3 on the desktop,

but I want to create folders here

E:BackupsImages of c drive

when I run

For $var = 1 to 3
   DirCreate("E:BackupsImages of c drive$var")
      Next

It just creates a folder named $var

Share this post


Link to post
Share on other sites

bingo

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