SharePoint files

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Portwolf
Posts: 161
Joined: 08 Oct 2018, 12:57

SharePoint files

09 Feb 2019, 05:22

I am trying to build a program that checks some folders on my team SharePoint, and downloads certain files, based on the version on the filename..

So, let's put it this way:

User has FileGnome_v12.xlsx on computer.
SP has FileGnome_V12.xlsx (no update)

User has FileGnome_v12.xlsx on computer.
SP has FileGnome_V13.xlsx (download file to X folder).

I use, just to update the files:

Code: Select all

UpdateExcelFiles:
{
file1=C:\Users\%A_UserName%\filepath
file2=C:\Users\%A_UserName%\filepath2
file3=C:\Users\%A_UserName%\filepath3

workfile_dir=%A_MyDocuments%\MiniApps\DailyFiles\
backupfile_dir=%A_MyDocuments%\MiniApps\DailyFiles\backup\

FileCreateDir, %workfile_dir%
FileCreateDir, %backupfile_dir%

FileCopy, %workfile_dir%\*.xlsm, %backupfile_dir%

FileDelete, %workfile_dir%\*.xlsm

FileCopy, %file1%\filename1_v*.xlsm, %workfile_dir%
FileCopy, %file2%\filename2_v*.xlsm,%workfile_dir%
FileCopy, %file3%\filename3_v*.xlsm, %workfile_dir%

run, %workfile_dir%
}
But this only works if i search the files on my local PC, using the wildcard (*) on the filename, because URL does not support it.
I needed to make it search via URL, because users on my team have the SP setup on different folders, and it is not quite effective to go one by one and setup the script individually.

Ideas?
murataygun
Posts: 104
Joined: 07 Aug 2015, 15:53

Re: SharePoint files

09 Feb 2019, 05:30

You may use regex approach.

Something like this;

Code: Select all

str := "ser has FileGnome_v12.xlsx on computer."

aa := RegExMatch(str, "[0-9]+", bb)

MsgBox % bb
Portwolf
Posts: 161
Joined: 08 Oct 2018, 12:57

Re: SharePoint files

09 Feb 2019, 06:42

but can i do that to an URL?
Doing it on a local folder is easy, i am using that approach on myself.
But checking the online filename versions via URL is my problem..

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, Joey5, JPMuir, matt101, Thorlian and 176 guests