Re: $$Excel-Macros$$ Deletion of files on specific path

2012-02-17 Thread dguillett1
PrIyAnKa Sent: Friday, February 17, 2012 4:38 AM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Deletion of files on specific path Dear Noorain I want to move only .xls files not the root folder also with it On Fri, Feb 17, 2012 at 3:39 PM, NOORAIN ANSARI wrote: Hi

Re: $$Excel-Macros$$ Deletion of files on specific path

2012-02-17 Thread PrIyAnKa
Dear Noorain I want to move only .xls files not the root folder also with it On Fri, Feb 17, 2012 at 3:39 PM, NOORAIN ANSARI wrote: > Hi Priyanka, > > by using this macro you can move source folder with subfolder to change > sfol = "c:\MyFolder" path. > > > > > On Fri, Feb 17, 2012 at 3:04 PM,

Re: $$Excel-Macros$$ Deletion of files on specific path

2012-02-17 Thread NOORAIN ANSARI
Hi Priyanka, by using this macro you can move source folder with subfolder to change sfol = "c:\MyFolder" path. On Fri, Feb 17, 2012 at 3:04 PM, PrIyAnKa wrote: > Dear Noorain > > I have files in different sub folders... > > as per below macro i may need to set number of sfol path ... > > sf

Re: $$Excel-Macros$$ Deletion of files on specific path

2012-02-17 Thread PrIyAnKa
Dear Noorain I have files in different sub folders... as per below macro i may need to set number of sfol path ... sfol = "c:\MyFolder" ' change to match the source folder path Kindly suggest if i m wrong... On Fri, Feb 17, 2012 at 12:55 PM, NOORAIN ANSARI wrote: > Hi Priyanka, > > Please try

Re: $$Excel-Macros$$ Deletion of files on specific path

2012-02-16 Thread NOORAIN ANSARI
Hi Priyanka, Please try it.. Sub CopyFilesFolder2Folder() Dim fso Dim sfol As String, dfol As String sfol = "c:\MyFolder" ' change to match the source folder path dfol = "e:\MyFolder" ' change to match the destination folder path Set fso = CreateObject("Scripting.FileSystemObject") On Error Resum

Re: $$Excel-Macros$$ Deletion of files on specific path

2012-02-16 Thread PrIyAnKa
ok Thanks viper for the help.. it works perfectly. need one of your favor also ,if i need to move the files from one drive to another drive then how it could be possible? I have tried the below one CLS C: CD move /-y "C:\Documents and Settings\Administrator\Desktop\sample\*sample.xlsx" "D:\New

Re: $$Excel-Macros$$ Deletion of files on specific path

2012-02-16 Thread Kris
Hi, Sub kTest() Dim obWSShell As Object Dim strDTop As String Dim objFSO As Object Dim objFldr As Object Set obWSShell = CreateObject("WScript.Shell") Set objFSO = CreateObject("scripting.filesystemobject") strDTop = obWSShell.SpecialFolder

Re: $$Excel-Macros$$ Deletion of files on specific path

2012-02-16 Thread The Viper
if your file name is exactly sample.xlsx then use C: CD "C:\Documents and Settings\priyanka\desktop\sample" DEL /q /s /f "sample.xlsx" On Thu, Feb 16, 2012 at 6:07 PM, The Viper wrote: > is "C:\Documents and Settings\priyanka\desktop\sample" the right path of > your master folder? > > if not,

Re: $$Excel-Macros$$ Deletion of files on specific path

2012-02-16 Thread The Viper
is "C:\Documents and Settings\priyanka\desktop\sample" the right path of your master folder? if not, change the path first and then file name On Thu, Feb 16, 2012 at 6:02 PM, PrIyAnKa wrote: > What i need to change in it? only file name > > Only red highlighted words need to change ? > > > >

Re: $$Excel-Macros$$ Deletion of files on specific path

2012-02-16 Thread PrIyAnKa
What i need to change in it? only file name Only red highlighted words need to change ? CLS C: CD "C:\Documents and Settings\priyanka\desktop\sample" DEL /q /s /f "sample.xlsx" change the path and you can use the wildcards like below DEL /q /s /f "*sample.xlsx" or DEL /q /s /f "sample*.xlsx"

Re: $$Excel-Macros$$ Deletion of files on specific path

2012-02-16 Thread The Viper
paste the below code in notepad and save it with .bat extension and run CLS C: CD "C:\Documents and Settings\priyanka\desktop\sample" DEL /q /s /f "sample.xlsx" change the path and you can use the wildcards like below DEL /q /s /f "*sample.xlsx" or DEL /q /s /f "sample*.xlsx" On Thu, Feb 16

Re: $$Excel-Macros$$ Deletion of files on specific path

2012-02-16 Thread PrIyAnKa
Dear Laxman Will it delete folder? or excel file from folders? and i have 239 folders and in all those folders there is a file,i want to delete that file Dear All Can we have a macro which go through sub folders and delete any specific excel file, without giving each 239 folders path On Thu, Fe

Re: $$Excel-Macros$$ Deletion of files on specific path

2012-02-16 Thread Lakshman Prasad
Dear PrIyANkAtyr this     Sub Delete_Folders_FS()  objFolder = "D:\Documents and Settings\lakshman-\Desktop\New Folder\*.*" Set objFSO = CreateObject("Scripting.FileSystemObject") objFSO.deletefolder objFolder   End Sub   LAKSHMAN From: PrIyAnKa To: excel-macros@