Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How I can Set file Downloding path
#1
I download a file from Internet. and I want to save a user define location.
How I can set through Quick Macro
file1.txt I want to save This file on
Suppose: 1) C:\Internet xyz file\
file2.xls I want to save This file on
2) D:\Internet abc\
#2
Do you want to automatically move downloaded files into different folders depending on file type?
#3
Yes. I want this.
I want to set file path first. Then File downloaded a specific folder
#4
str sfile="$desktop$\xyz.xls"
str sheet="Sheet1"
;;Works the Magic...
Excel.Application app._create
Excel.Workbook book=app.Workbooks.Open(_s.expandpath(sfile))
ExcelSheet es.ws=book.Worksheets.Item(sheet)

es.ws.Range("mConfused").Delete
es.ws.Range("k:k").Delete
es.ws.Range("c:e").Delete
es.ws.Range("a:a").Delete


' FOR SAVE UNIQUE NAME
rep 1
,int random num
,num=1;;edit your number here
,random=RandomInt(1 99)
out random

str file_ext f_extension=random
file_ext.from(f_extension ".xls")

str fileName1 name10 ="Change_"
fileName1.from(name10 file_ext)
out fileName1


str directory ="$desktop$/Excel/"

SetCurDir(directory)

,;******** I want changing file to "$desktop$/Excel/" ********** folder How I can do, I want Both file are save in different location

es.ws.SaveAs(fileName1)


;;Saves the Excel sheet
book.Save
;;Closes the Excel
book.Close
#5
Quote:,;******** I want changing file to "$desktop$/Excel/" ********** folder How I can do, I want Both file are save in different location

Change fileName1?
#6
str sfile="$desktop$\Abc.xls"

str sheet="Sheet1"
;;Works the Magic...
Excel.Application app._create
Excel.Workbook book=app.Workbooks.Open(_s.expandpath(sfile))
ExcelSheet es.ws=book.Worksheets.Item(sheet)

es.ws.Range("mConfused").Delete
es.ws.Range("k:k").Delete
es.ws.Range("c:e").Delete
es.ws.Range("a:a").Delete

str editFile ="Edit"

str directory ="$desktop$/Excel/"

directory.from(editFile ".xls") ;; NOT WORKING Original file is "$desktop$\Abc.xls"
es.ws.SaveAs(directory) ;; I want Edit copy in $desktop$/Excel/Edit.xls" Folder


;;Saves the Excel sheet
book.Save
;;Closes the Excel
book.Close
#7
Let's simplify.

Macro Macro1424
Code:
Copy      Help
;we have this file
str sfile="$desktop$\Abc.xls"

;need to rename to
str editFile ="Edit"

;and move to folder
str directory ="$desktop$\Excel\"

str destFile
destFile.from(directory editFile ".xls")
destFile.expandpath

out destFile

;es.ws.SaveAs(destFile) ;; I want Edit copy in $desktop$/Excel/Edit.xls" Folder
#8
Thank you very much...

Actually, I am new.. I am learning macro last 2 weak. I like very much

I am very - very happy to u you help me.


My next problem is Can I set file downloading path. ?? Downloading window is open When I click save button the file destination path is set and file save to destination folder...
#9
In what browser?
#10
Through Internet Explorer. Our website has Excel file download option. I want When I click download file goes to $Desktop$\Download Folder.

but id(1 win("Save As" "#32770")) ;; *************** How I can set Desktop Path ***********

Htm el_cmdClose=htm("INPUT" "cmdClose" "" win("Report - Windows Internet Explorer" "IEFrame") "1" 2 0x121)
el_cmdClose.Click
clo w1
but id(4377 win("Download complete" "#32770"))
#11
Otherwise, How I can track file downloaded folder Path.
means, How I can find where downloaded file is store?
#12
In 'Save As' dialog, 'File name' field is focused, isn't it? And it shows file name? Then macro can simply paste full path.

str s
s.getsel ;;copy filename
s-"$desktop$\Download folder\"
s.expandpath
s.setsel ;;paste full path


Forum Jump:


Users browsing this thread: 1 Guest(s)