If you mean scripting at Windows level, I think yes, it is possible. You
might want to look into the Windows File System Object. The FileSystemObject
provides access to the computer file system and the ability to manage file,
folders and drives. Basic methods include the ability to create, delete,
move and copy files and directories. The core functions are all exposed
through the FileSystemObject, it can be accessed to using the CreateObject
method. This can be done with VisualLISP. If you get a grip of the
FileSystemObject and then you dump it, you will find some useful methods:
;;;==================================
(defun usefso ( / fsobj)
(vl-load-com)
(setq fsobj
(vlax-create-object "Scripting.FileSystemObject")
)
(vlax-dump-object fsobj T)
;;;++++++++++++++++++++++++++++
;;; You can do smething else here using fsobj
;;; like copying the folder and the files.
;;; Use CopyFolder and CopyFiles methods
;;;++++++++++++++++++++++++++++
(vlax-release-object fsobj)
(princ)
)
;;;==================================
Command: (usefso)
; IFileSystem3: FileSystemObject
; Property values:
; Drives (RO) = #
; Methods supported:
; BuildPath (2)
; CopyFile (3)
; CopyFolder (3)
; CreateFolder (1)
; CreateTextFile (3)
; DeleteFile (2)
; DeleteFolder (2)
; DriveExists (1)
; FileExists (1)
; FolderExists (1)
; GetAbsolutePathName (1)
; GetBaseName (1)
; GetDrive (1)
; GetDriveName (1)
; GetExtensionName (1)
; GetFile (1)
; GetFileName (1)
; GetFileVersion (1)
; GetFolder (1)
; GetParentFolderName (1)
; GetSpecialFolder (1)
; GetStandardStream (2)
; GetTempName ()
; MoveFile (2)
; MoveFolder (2)
; OpenTextFile (4)
T
HTH
--
Humans are born with a wide horizon.
As time goes by, the horizon narrows and
narrows, until it becomes a point of view.
a écrit dans le message de news: 6247514@discussion.autodesk.com...
does anyone know if there is a way to copy a file folder from within lisp or
a script file? i know how to copy drawings and rename them and such but is
there a way to copy a whole directory (containing maybe 3 or 4 drawings) and
then rename the directory?