You are here

quick file moving question

3 posts / 0 new
Last post
Travis Carrico
Offline
Last seen: 15 years 4 months ago
Developer
Joined: 2006-10-22 00:30
quick file moving question

just thought i'd ask a quick question. if i'm moving files between the flash drive and the hard drive, will the Rename command still work, or do i need to copy and then copy back with the replaceinfile?

Simeon
Simeon's picture
Offline
Last seen: 9 years 6 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
AFAIK

Rename will work.
But replaceinfile is for changing things like drive letters inside a file and not for copying it.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

rab040ma
Offline
Last seen: 3 days 22 hours ago
Joined: 2007-08-27 13:35
Some versions of "rename"

Some versions of "rename" (or "move") only work within the same drive. NSIS will allow you to use "Rename" to move a file from one volume or drive to another, but it will only allow renaming of folders within the same drive.

Once you have moved the files or folders (whether you "Rename" them or use CopyFiles and then Delete) you might want to use ReplaceInFile to change references inside the files from the old drive letter or path to the new. But that should be thought of as a different step from the "Rename" step. You could write a routine that would do it on the fly in one step, but doing it in two steps with existing commands or functions is probably a more efficient way to go.

MC

Log in or register to post comments