Create Folder from the name of file and move file
Posted: 30 Jan 2009 13:31
Hi everyone,
I have a list of files in the Root C:, i wanna if its possible to read the first 12 character of the name of a file, and from that create a folder and then move the file to that folder.
Example
File:
000000015894001_1.doc
000000015894001_2.doc
000000015894001_3.doc
000000045788001_1.doc
000000045788001_2.doc
000000045788001_3.doc
Create Folders From Name of Files:
000000015894
000000045788
And move the files inside the folders
Folder: 000000015894
Files--
000000015894001_1
000000015894001_2
000000015894001_3
Folder: 000000045788
000000045788001_1
000000045788001_2
000000045788001_3
Thnks in Advance.
I have a list of files in the Root C:, i wanna if its possible to read the first 12 character of the name of a file, and from that create a folder and then move the file to that folder.
Example
File:
000000015894001_1.doc
000000015894001_2.doc
000000015894001_3.doc
000000045788001_1.doc
000000045788001_2.doc
000000045788001_3.doc
Create Folders From Name of Files:
000000015894
000000045788
And move the files inside the folders
Folder: 000000015894
Files--
000000015894001_1
000000015894001_2
000000015894001_3
Folder: 000000045788
000000045788001_1
000000045788001_2
000000045788001_3
Thnks in Advance.