badguy Posted September 11, 2009 Share Posted September 11, 2009 Hi Guys, Accidently I have used the filemove command to rename a directory. Now I have got a hugh list of files (which should be a directory). How can I change the files to be a directory? Any hints? //badguy Link to comment Share on other sites More sharing options...
jvanegmond Posted September 11, 2009 Share Posted September 11, 2009 Write a script to reverse the damage you've done with the other script. github.com/jvanegmond Link to comment Share on other sites More sharing options...
badguy Posted September 11, 2009 Author Share Posted September 11, 2009 Hi Mandar, nice idea - but a filemove or dirmove didn't createa a directory from the files. It seems I musst change some attributs, but I have no clue which ones and howto //badbuy Link to comment Share on other sites More sharing options...
GEOSoft Posted September 11, 2009 Share Posted September 11, 2009 Just pull up the backup you made of the directory that you put away safely before you ran the script. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
tn5421 Posted September 11, 2009 Share Posted September 11, 2009 Just pull up the backup you made of the directory that you put away safely before you ran the script.If he had a backup, he wouldn't have made this topic. Link to comment Share on other sites More sharing options...
badguy Posted September 11, 2009 Author Share Posted September 11, 2009 some other hints? Link to comment Share on other sites More sharing options...
Rishav Posted September 11, 2009 Share Posted September 11, 2009 (edited) Write a script to reverse the damage you've done with the other script.and put both in an infinite while do loop so the errata and errorfixer run in a eternal tango of purpose. anyway,seriously though, you can get the file list in an array. using the string commands strip the directory part and get the file name in another array.Start a for loop to last till the number fo files.Then rename all files (file+folder name) to the (file) name. just check if the file name is same as stringright of the file+folder name.close for loop.now you should have a directory full of files with correct names.now just run a correct filemove script or just copy paste them manually.let me know if any more specifics are required.regardsRishavps. throw in some code. i just realized that what i said is probably useless for you. pps. lemme know if the prob iscurrent file names:xxxxfolder\xxxfile1.extxxxxfolder\xxxfile2.extxxxxfolder\xxxfile3.ext..........Correct file names:file1.extfile2.extfile3.ext.......your problem being that the number of files is so large, you can't rename them manually? Edited September 11, 2009 by Rishav Link to comment Share on other sites More sharing options...
jvanegmond Posted September 11, 2009 Share Posted September 11, 2009 badguy, I have tried what you were doing:Accidently I have used the filemove command to rename a directory.Now I have got a hugh list of files (which should be a directory).This was my reproduction script:FileMove("roflwin", "lolwat")roflwin is a directory in the same place as the script. I have run the script and the roflwin directory is still there.Can you give more details on the circumstances of this behavior? github.com/jvanegmond Link to comment Share on other sites More sharing options...
badguy Posted September 11, 2009 Author Share Posted September 11, 2009 Hi Manadar, thanks for the hint. You made my day... As the original folders were about 1000 and the so resulting wrong files were also about 1000, I had forgotten to scroll down and didn't realize the still existing orignal folders... If I come over one day to Alkmaar, you will get a crate of Dortmunder beer ;o) //badguy Link to comment Share on other sites More sharing options...
jvanegmond Posted September 11, 2009 Share Posted September 11, 2009 I'm glad to help. I look forward to your visit. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Rishav Posted September 11, 2009 Share Posted September 11, 2009 i never get any love. Link to comment Share on other sites More sharing options...
jvanegmond Posted September 11, 2009 Share Posted September 11, 2009 i never get any love. It's called a tl;dr; github.com/jvanegmond Link to comment Share on other sites More sharing options...
GEOSoft Posted September 12, 2009 Share Posted September 12, 2009 If he had a backup, he wouldn't have made this topic.You must be kidding me. I would never have guessed that there are still people out there who will test a script without backups. That's simply amazing and I may not get over the shock of hearing about it. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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