Sign in to follow this  
Followers 0
qwert

Need to copy PNG files and remove extension on copies

3 posts in this topic

I've tried using FileMove ( <filename.png>, <filename> ) ... but it always returns 0 and the file isn't moved. I suppose the central question is: can AutoIt3 write a file that doesn't have a file extension as part of the name?

Does anyone happen to know? I haven't been able to find a similar example.

Thanks for any help.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Filemove works well, it can move or rename file with or without extension,

like this :

$_FileMove = FileMove ( "C:\filename.png", "D:\filename" )
ConsoleWrite ( "$_FileMove : " & $_FileMove & @Crlf )

It return 1 and file moved have no extension.

If it doesn't work , see if destination exists ( flag 8 ), if characters are allowed, if there is some attributes that prevents the overwriting ( flag 1 ).

Show your filemove tries...

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Well, FileMove and FileCopy both work. It was me. I was using a calculated path based on the results of a _FileListToArray operation ... and the calc didn't include the final "\" before the filename.

Thanks for your reply.

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