Jump to content

Moving many image files:)


Roofel
 Share

Recommended Posts

Hello:) I just wondered, Im currently making a script that moves all the files in a folder with no extension(file) and create a folder and place the files there.

I am thinking of using FileCopy and such but i im not sure how to use the \Folder\*.* when trying to get a "file"(no Extension).

Ill check back with a example of my idea when i get back on:)

Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D

Link to comment
Share on other sites

Hi, thanks Zedna :D

"*." works fine for no extensions

Global $Src = @HomeDrive & "\#1_Source_NoExtCopyTest\"
Global $Dest = @HomeDrive & "\#2_Destination_NoExtCopyTest\"

;Create a source directory and 500 dummy files with no extensions if they don't already exist
If Not FileExists($Src) Then DirCreate($Src)
For $i = 1 To 500
    If Not FileExists($Src & "Dummy" & $i) Then FileClose(FileWrite($Src & "Dummy" & $i, ""))
Next

;file copy will create the destination directory if it doesn't exist
FileCopy($Src & "*.", $Dest, 9)

Cheers

Link to comment
Share on other sites

I have gotten all the way to moving the files into a newly made folder, but how can i get it to change the extension while inside the "source" folder and then move them and only get the .gif files?:) Currently getting a few files that uses no extension(file) and then renaming it to .gif files for it to be able to viewing..

I cant delete the created folder because it says it is being used by a program but it is nothing about that script in taskmanager and when i check the folder properties, it says Read-only. I change it but when i click OK it reverts back to the old settings:S

Dont know if you understood that but please help me, Im not releasing full code incase of someone trying to steal my scripts... Done it before-.-

Edited by Roofel

Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...