Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another Noob question

Quick Macros sounds like maybe I am on the right track.

What I am trying to automate is:

Every week I receive a series of Word Documents with filenames like 1234567.doc, 9876543.doc, 4444555.doc, etc.

I then manually create folders with the same names (no extensions obviously): 1234567, 9876543, 4444555.

Then I move the document to its corresponding folder. So 1234567.doc is moved to folder 1234567, 9876543.doc is moved to folder 9876543, etc.

Is this a job for Quick Macros?

I'm a pretty quick learner when it comes to programming, so no worries there.

Macro Macro1706
Copy      Help
str files="d:\downloads\*.doc" ;;change this
str moveToFolder="c:\folder" ;;change this

mkdir moveToFolder ;;create folder if does not exist
Dir d
foreach(d files FE_Dir) ;;for each file that matches the pattern. The initial code created with dialog "Enumerate files".
,str sPath=d.FileName(1)
,;out sPath ;;debug
,str newFolder.from(moveToFolder "\" _s.getfilename(sPath)) ;;create new folder path
,;out newFolder; continue ;;debug
,mkdir newFolder ;;create new folder for the file
,ren sPath newFolder ;;move the file

run moveToFolder ;;open the destination folder to see what we have
Yes, that works!

I added a couple of dialog boxes to request the strings for the files and folder locations.

When I make this into a .EXE, Quick Macros also outputs a .QML file. Do I need this .QML file for the .EXE to run?

QM does not make more files, only single .exe file, and you don't need a .qml file with it.

Forum Jump:

Users browsing this thread: 1 Guest(s)