Rybar Posted December 30, 2009 Share Posted December 30, 2009 I'm sure I can make AutoIt do what I need it to, but I need a little help. I work for a sign company as a graphic artist. We have a large number of files that need reorganized for easier backup and discarding of old files. Currently each company has a folder named 'CompanyName' and then inside that folder there is a folder for each year we've done work for them. Example: -CompanyName | |-2001 |-2002 |-2003 etc... We need to reorganize them by year first, then company name, like this: -2001 |-CompanyName1 |-CompanyName2 |-CompanyName3 etc... I realize this will create duplicate company name folders in each year, and that's how we want it, as our newer files are organized in this fashion. Can this process of moving files/creating folders be automated with AutoIt? Anyone care to share a couple lines of code? I've taken a look at the help files, but I have very little programming experience. One of the things I couldn't figure out is how you would retrieve a directory name from one level above the current path and use it to create the new CompanyName folder. Thanks for your help in advance. Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 30, 2009 Share Posted December 30, 2009 I'm sure I can make AutoIt do what I need it to, but I need a little help.I work for a sign company as a graphic artist. We have a large number of files that need reorganized for easier backup and discarding of old files. Currently each company has a folder named 'CompanyName' and then inside that folder there is a folder for each year we've done work for them.Example:-CompanyName | |-2001 |-2002 |-2003 etc...We need to reorganize them by year first, then company name, like this:-2001 |-CompanyName1 |-CompanyName2 |-CompanyName3 etc...I realize this will create duplicate company name folders in each year, and that's how we want it, as our newer files are organized in this fashion.Can this process of moving files/creating folders be automated with AutoIt?Yes, and it should be a fairly simple project to learn AutoIt with. Remember to write it so that it only writes what it was going to do to the screen before testing anything that actually makes changes to your system.Anyone care to share a couple lines of code? I've taken a look at the help files, but I have very little programming experience. One of the things I couldn't figure out is how you would retrieve a directory name from one level above the current path and use it to create the new CompanyName folder. Thanks for your help in advance.Look at the help file example scripts for _FileListToArray(), FileMove(), etc. For the parent path, you should look at _PathGetRelative().Give it a shot and post your code if you need more help.And welcome to AutoIt. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now