Forum Discussion
joffre
14 years agoRegular Contributor
Change the line for your path to the following: Const Path = "D:\Scripts\Scripts"
Notice that I removed the closing backslash. If you have that extra slash in there, while the scripts don't log an error, they do record that the rename was not possible.
So, the rename is not what's populating the new column, the next row where you are renaming SQL Server to SQLServer, because the FIRST rename folder failed, is populating the new folder.
Correct that constant and see if that helps.
Same problem Robert. Now I changed the folders too, still creating a new folder and pasting the other folder inside the new one!
Here is my code. Note that I removed the last backslash from the const:
Sub Teste2
Path = "D:\Scripts\Scripts"
Call aqFileSystem.RenameFolder(Path&"\01 - LGComponentes", Path&"\1.LGComponentes")
Call aqFileSystem.RenameFolder(Path&"1.LGComponentes\SQL Server", Path&"\1.LGComponentes\SQLServer")
Call aqFileSystem.RenameFile(Path&"\1.LGComponentes\SQL Server\1.LGComponentes_CREATE_SQL_SERVER.sql", Path&"\1.LGComponentes\SQL Server\1.SQL")
Log.Message("Folder 1.LGComponentes renamed")
End Sub